Sending Illegal XML Characters in Soap Request

Posted by SK on Stack Overflow See other posts from Stack Overflow or by SK
Published on 2010-03-19T18:51:31Z Indexed on 2010/03/20 1:21 UTC
Read the original article Hit count: 475

Filed under:
|
|
|
|

I am trying to send special (&, ' (single quote)) characters in the Soap Request. I am using axis 1.4. The webservice client is in weblogic server and the webservice server is an ibm mainframe (COBOL program).

The request data from the client contains special character (& symbol) which is converted to &

I tried to enclose it with CDATA as

<![CDATA[Some Name & Some Data ]]> which got converted to

&lt;![CDATA[Some Name &amp; Some Data]]&gt; 

The webservice client is generated from wsdl, so I couldn't use CDATA api to construct the request. I am able to set it as string value, and it is getting converted.

Any help on this would be greatly appreciated. Please let me know if you need any more information on this.

© Stack Overflow or respective owner

Related posts about Xml

Related posts about escape