You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Tony Field <to...@fatwire.com> on 2004/04/12 19:10:31 UTC

invalid character question

Hello,

This is my first post to this list, so I apologize if this issue has 
been addressed.

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 
http://www.w3.org/TR/2004/REC-xml-20040204/#charsets), 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.

Sincerely,
Tony