Return-Path: Delivered-To: apmail-ws-axis-user-archive@www.apache.org Received: (qmail 87376 invoked from network); 6 Jan 2004 18:05:25 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 6 Jan 2004 18:05:25 -0000 Received: (qmail 93025 invoked by uid 500); 6 Jan 2004 18:05:09 -0000 Delivered-To: apmail-ws-axis-user-archive@ws.apache.org Received: (qmail 92817 invoked by uid 500); 6 Jan 2004 18:05:07 -0000 Mailing-List: contact axis-user-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-user@ws.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list axis-user@ws.apache.org Received: (qmail 92806 invoked from network); 6 Jan 2004 18:05:07 -0000 From: "Richard Martin" To: Subject: RE: XML within string parameter to RPC Service Date: Tue, 6 Jan 2004 18:08:50 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook, Build 11.0.5207 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 In-Reply-To: Thread-Index: AcPUX0H0mXpMFvr4RPm2rd5q4ZCNigAH5W7g Message-Id: X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hi tom, Comments inline: >Hi all, >I am going to be using Axis to invoke an RPC style web service which takes >a single string parameter. This string parameter is going to contain an XML > message. What I am wondering is if I need to wrap this String in a CDATA > section before I invoke the web service? You don't need to wrap it. Technically if you are passing XML then RPC isn't the best way to go - a message based service would be better if you can stand using org.w3c.dom classes. >>From reading the XML specification it says that character data consists of >any text that does not contain markup. However my string value will contain >markup. I have tested invoking the web service without wrapping my String >in a CDATA section and have found that Axis has changed all the markup >characters into their respective entity references (i.e. < has become >) AXIS has to remove all of the restricted characters in XML ( <, >, and & ) and put entity references or it will break the XML parsers in both the client and server. To my knowledge however, these references are automagically replaced by axis before invoking the web service - so if you are invoking a web service with a String argument containing XML, it shouldn't contain any entity references. Regards, Richard