axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "kent lu" <kentj...@msn.com>
Subject help on encoding issue in SOAP response
Date Sat, 29 Apr 2006 00:14:44 GMT
<html><div style='background-color:'><DIV class=RTE></DIV><BR>
<DIV>We have a Web Service which is reading data from DB, and return as a SOAP response.
We also have a .Net as a consumer to read the SOAP response, parse it and display on the GUI.</DIV>
<DIV>
<DIV>&nbsp;</DIV>
<DIV>But the issue here is, in some cases user may key in some strange character and
when we set it in response, .net client can not parse it correctly and always throw an Exception.</DIV>
<DIV>
<DIV>&nbsp;</DIV>
<DIV>Below is an example of the element in reponse:</DIV>
<DIV><FONT size=1>&lt;Desc&gt;</FONT><FONT color=#ff0000 size=1>&amp;#56256;&amp;#56442;&amp;amp;lt;&lt;</FONT><FONT
size=1>/Desc&gt;</FONT></DIV>
<DIV><FONT size=1><FONT size=2>You can see above character is a 4 bytes
character, which out of UTF-8, and it have a '&lt;' character followed, when we parse
this kind of element the exception will be thrown always.</FONT></FONT></DIV>
<DIV>
<DIV><FONT size=1><FONT size=2></FONT></FONT>&nbsp;</DIV>
<DIV><FONT size=1><FONT size=2>So the quetsion here is:</FONT></FONT></DIV>
<DIV><FONT size=1><FONT size=2>1. Can we do any other encode the convert
this kind of character?</FONT></FONT></DIV>
<DIV><FONT size=1><FONT size=2>2. Can we use CDATA in SOAP response within
Axis framework? I think if we can do so your problem can be resolved.</FONT></FONT></DIV>
<DIV>
<DIV><FONT size=1><FONT size=2></FONT></FONT>&nbsp;</DIV>
<DIV><FONT size=1><FONT size=2>Thanks</FONT></FONT></DIV>
<DIV>
<DIV>
<DIV><FONT size=1><FONT size=2></FONT></FONT>&nbsp;</DIV>
<DIV><FONT size=1><FONT size=2>Kent</FONT></FONT></DIV></DIV></DIV></DIV></DIV></DIV></DIV>
<DIV></DIV></div><br clear=all><hr> <a href="http://g.msn.com/8HMBENUS/2731??PS=47575"
target="_top">Find just what you're after with the new, more precise MSN Search - try it
now!</a> </html>


Mime
View raw message