Sending invalid XML characters in a soap request

I am trying to send special ( &, '(single quotes)) characters in a soap request. I am using axis 1.4. The webservice client is located on the weblogic server, and the webservice server is on the ibm mainframe (COBOL program).

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

I tried to enclose it with CDATA as

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

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

The webservice client is created from wsdl, so I could not use the CDATA api to create the request. I can set it as a string value and it is converted.

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

+3
source share
1 answer

The client web services pins do the XML encoding for you. The web service expects XML and encodes the links, &and 'in essence, so that you send the correct XML.

In the XML parser, it will “see” &amp;how &, and you have no problem.

If the server cannot process entity references, then the COBOL "web service" does not do what it should do. This makes it difficult for you (and standards-based tools) to create client stubs from WSDL, which is essentially a contract that describes the rules for data format and data exchange.

WSDL SOAP-, ?

+7

Source: https://habr.com/ru/post/1737728/


All Articles