axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oliver Adler" <Oliver.Ad...@SYRACOM.DE>
Subject AW: AW: encoding
Date Tue, 25 Feb 2003 15:00:06 GMT
(1): this xml is NOT valid
<?xml version="1.0" encoding="UTF-8"?>
<xyz>
       öäü ß <>
</xyz>
 
(2): this is the correct version
<?xml version="1.0" encoding="UTF-8"?>
<xyz>
       &#246;&#228;&#252; &#223; &lt;&gt;
</xyz>
 
this is valid xml (!) which you can pass to axis. Axis will encode this string to:
(3): this is on the wire
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&lt;xyz&gt;&amp;#246;&amp;#228;&amp;#252;
&amp;#223; &amp;lt;&amp;gt;&lt;/xyz&gt;
 
So the error is on the side where xml-string(1) is created.
 
Regards
Oliver
 
 

	-----Ursprüngliche Nachricht----- 
	Von: Thomas Schröter [mailto:t.schroeter@gmx.com] 
	Gesendet: Di 25.02.2003 13.00 Uhr 
	An: axis-user@ws.apache.org 
	Cc: 
	Betreff: Re: AW: encoding
	
	
	The string is sent contains a XML-Document whereby special characters and
	umlauts encoded. Axis decodes this string correctly. But now I'd like to
	process
	this string with a XML-Parser like xerces and now a exception is thrown
	because in
	this document special characters like <> represented directly. 
	
	> Hello Thomas,
	>  
	> how looks the string which you send ? Are there the <> symbols ? Then 
	> the original xml would fail to parse too. So it's not axis fault :-)
	> What you can do is to XML-encode the string 
	> (XMLUtils.xmlEncodeString(value) does it for you) before you give to 
	> axis.
	>  
	> Regards
	>  
	> Oliver
	>
	____________________________________________________________________ 
	> 
	> Oliver Adler, Senior Consultant
	> SYRACOM Systems AG - "The IT-Architects" 
	> 
	> Otto-von-Guericke-Ring 15 
	> D-65205 Wiesbaden 
	> 
	> Tel +49 6122-9176-0 
	> Fax +49 6122-9176-11 
	> Mobil +49 175-1853998 
	> 
	> E-Mail: Oliver.Adler@SYRACOM.de 
	> www.SYRACOM.de 
	> 
	> Ein Unternehmen der SYRACOM Gruppe - "The Business- & IT-Architects" 
	> 
	>
	____________________________________________________________________
	> 
	>       -----Ursprüngliche Nachricht----- 
	>       Von: Thomas Schröter [mailto:t.schroeter@gmx.com] 
	>       Gesendet: Di 25.02.2003 11.34 Uhr 
	>       An: axis-user@ws.apache.org 
	>       Cc: 
	>       Betreff: encoding
	>       
	>       
	>       Hello,
	>       
	>       I receive SOAP messages over the Axis Client which contained again XML 
	> data
	>       as
	>       parameter with umlauts and special characters (UTF8 encoded):
	>       
	>       ...
	>       ...
	>       <ns4:callResponse>
	>       <result xsi:type="xsd:string">
	>       
	>       
	>       &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
	>       &lt;xyz&gt; 
	>       öà (B -b?� � &lt;&gt;
	>       &lt;/xyz&gt;
	>       
	>       
	>       </result>
	>       </ns4:callResponse>
	>       ...
	>       ...
	>       
	>       Axis converts the result to:
	>       
	>       <?xml version="1.0" encoding="UTF-8"?>
	>       <xyz>
	>       öäü ß <>
	>       </xyz>
	>       
	>       Now I'd like to parse the result but a SAXParseException is thrown, 
	> because
	>       <> is not a valid Markup. 
	>       
	>       Can someone support me in this case ?
	>       
	>       Regards,
	>       Thomas
	


Mime
View raw message