axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard Martin" <>
Subject RE: XML within string parameter to RPC Service
Date Tue, 06 Jan 2004 18:08:50 GMT
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 &gt;)

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. 



View raw message