axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary L Peskin" <>
Subject RE: invalid character question
Date Wed, 14 Apr 2004 07:30:45 GMT
As indicated in your cited reference to the XML 1.0 Recommendation, the
character $#28 is -not- a valid XML 1.0 character (ie Char) and cannot
appear in a well-formed XML document.  This is true regardless of whether
the character appears directly or through a character reference.  Whether it
appears inside or outside of a CDATA section is of no consequence
whatsoever.  The CDATA section is provided to include < and & without the
need to escape them (which is required in a non-CDATA section).  

-----Original Message-----
From: Tony Field [] 
Sent: Tuesday, April 13, 2004 1:33 PM
Subject: invalid character question

This is my first post to this list, so I apologize if this issue has been
I'm using Axis as a client to a web service. The client stubs were generated
using wsdl2java. Everything seems to work well for me, except when my XML
document body contains the 1C character. To get around this, our web service
encloses our document data in a cdata block. When we encounter a character
that is not valid (per, we close the cdata
block and escape the character using &#refNo; for each invalid character,
then re-open the cdata block and continue with the document.
So, for example a document may look like this:

<item><![CDATA[The words ]]>&#28;<![CDATA[what is in your wallet]]></item>
The problem I'm having is that the axis client is throwing an exception
parsing the response with this data in it. The exception thrown is listed
below. Why is axis failing to parse this response? I see the failure using
both xerces and crimson. A colleague has tested this using XMLSpy and it
does not fail to parse the response - the response looks exactly like what I
show above.
Any help would be greatly appreciated.

View raw message