ws-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Suresh Janardhanan <>
Date Thu, 19 Jan 2012 01:36:29 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?


Thanks much for your help,

On Wed, Jan 18, 2012 at 19:29, Janardhanan, Suresh B
<> wrote:
> Is there any way to find out if the
> “” is getting overridden.

No. The settings in can only be overridden
by a StAXParserConfiguration object, but this doesn't generate any
debug logs. Axis2 uses StAXParserConfiguration.SOAP, but that
configuration doesn't change the

> From
> -> newXMLInputFactory() method, there is no debug line, which
> shows what property is getting set. I was able to print the key, value pair
> using the following code.

If you enable debug logging on StAXUtils, it will actually output that
information in the loadFactoryProperties method, but this occurs only
once because the factory is cached.

> ClassLoader is able to find the
> file but I can still see that CDATA string is not
> preserved in the logs.

Short answer: that is because there are no CDATA sections to preserve...

Long answer: With Woodstox (other parsers require additional
settings), can be used to make
sure that CDATA sections are reported with a distinct event type (and
not as CHARACTERS events), so that the syntactic information about
CDATA sections is not lost in the object model built by Axiom (which
is generally not a problem because a CDATA section is a purely
syntactic construct, but is not supposed to carry any semantic

The logs you have shown actually indicate that the message that is
being parsed doesn't contain any CDATA section:

2012-01-18 11:10:34,587 [main] DEBUG httpclient.wire.content  - << "<?xm"
2012-01-18 11:10:34,588 [main] DEBUG httpclient.wire.content  - << "l
version="1.0" encoding="utf-8"?><soap:Envelope

Note that even your output message doesn't contain any CDATA section:

2012-01-18 11:10:34,560 [main] DEBUG httpclient.wire.content  - >>
"<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope

"&lt;!CDATA[" is not a CDATA section, but character data that
represents "<![CDATA[" (in the same way as "List&lt;String>" is
character data that represents "List<String>" and not a text node
followed by a "String" element).

View raw message