Hi Saliya,
 I have also tried Axis 1.4.1 and 1.4. The CDATA is always escaped. If you
can point where is the Axis2 snapshot is located, then I will try that.

Regards,
Vinay Cardoza


Saliya Ekanayake wrote:
> 
> Hi,
> 
> I tested this using Axis2 nightly build but couldn't recreate your issue.
> I
> mean, it works fine. If you can please try with Axis2 Snapshot.
> 
> Thanks,
> Saliya
> 
> On Wed, Sep 17, 2008 at 9:03 PM, Vinay Cardoza
> <[EMAIL PROTECTED]>wrote:
> 
>>
>> 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]
>>
>>
> 
> 
> -- 
> Saliya Ekanayake
> http://www.esaliya.blogspot.com
> http://www.esaliya.wordpress.com
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Problem-with-CDATA-tags-in-SOAP-message.-tp19534836p19548996.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