axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tony Field <tony.fi...@fatwire.com>
Subject Re: invalid character question
Date Wed, 14 Apr 2004 17:26:16 GMT
Thank you Gary, that explains my question exactly.  I did not 
understand that you couldn't even have a reference to an invalid 
character in a well-formed xml document.

Tony

On 14-Apr-04, at 3:30 AM, Gary L Peskin wrote:

> 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). 
>   
> HTH,
> Gary
> -----Original Message-----
> From: Tony Field [mailto:tony.field@fatwire.com]
>  Sent: Tuesday, April 13, 2004 1:33 PM
> To: axis-dev@ws.apache.org
> Subject: 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


Mime
View raw message