Hi,
    I am trying to send a SOAP request using Apache Axis 1.3. An element in
the SOAP body requires the text to be wrapped in CDATA element. 
 
The code snippet is as follows: 
 
String stringToBeWrapped = "A'B'C'D";
 
OMElement elementWhichNeedsCData = ....;
 
TextImpl omText = (TextImpl)
bodyElement.getOMFactory().createOMText(stringToBeWrapped); 
omText.setType(XMLStreamConstants.CDATA);
elementWhichNeedsCData.addChild(omText);
 
The code compiles without any problems. However the SOAP request is as
follows:
 
<soapenv:Body
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
wsu:Id="Id-17777129">
    <s1:EdiCustomsDeclaration
xmlns:s1="http://www.examples.com/schemas/custom/edi/v1";>
                &lt;![CDATA[A'B'C'D]]&gt;
    </s1:EdiCustomsDeclaration>
</soapenv:Body></soapenv:Envelope>
 
The CDATA text element has &gt; and &lt; escape characters. 
 
When I print the omText value, I can see the CDATA construct intact. But the
SOAP message shows something else.
 
How do I prevent escape characters from appearing in the CDATA construct?
Please help.
 
Regards,
Vinay Cardoza


-- 
View this message in context: 
http://www.nabble.com/Problem-with-CDATA-tags-in-SOAP-message.-tp19534836p19534836.html
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to