ws-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Janardhanan, Suresh B" <>
Subject CDATA XML String
Date Thu, 19 Jan 2012 19:20:59 GMT

Thanks for your response. You pointed out that the <![CDATA[ section is actually a character
section. But since the soap envelope is getting sent with invalid XML characters the Target
.Net web service is sending a code back, which interprets to invalid XML parameters format.

2012-01-18 13:35:20,422 [main] DEBUG httpclient.wire.content  - >> "<?xml version='1.0'
encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv=""><soapenv:Body><ns1:RetrieveByParameter

Do you know if there is a way to send the XML string as is?


I also tried changing the WSDL type and that resulted in an Exception - CDATA not allowed
in prolog/epilog.

WSDL - changed sXmlParameters type=s:string to xmlStingType as shown below.
            <xsd:schema xmlns:xsd=""
                  <xsd:complexType name="xmlStringType">
                              <xsd:any xmlns:xsd=""/>
<wsdl:part name="sXmlParameters" type="tns:xmlStringType" />

Code Snippet:
XmlStringType xmlStrType = new XmlStringType();
      OMElement element = AXIOMUtil.stringToOM(xmlParameters);

Stack Trace:
Caused by: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected
character 'C' (code 67) (CDATA not allowed in prolog/epilog)
at [row,col {unknown-source}]: [1,3]
  Stack Trace:

Thanks much for your help,

View raw message