I'm using Axis 1.1 and recently became aware of a problem when sending
Strings with non-ASCII characters. Even though the Soap message is
serialized with a encoding="UTF-8" header, the contents is NOT UTF-8
but, at least in my case, ISO-8859-1 (I guess it depends on the default
encoding for the JVM, I haven't tested it)
For example, if I have an operation called "getIt" that returns the
String "niño" (that is n, i, n-tilde, o), the Soap message comes like
this through the wire:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<getItResponse xmlns="">
<getItReturn
xsi:type="xsd:string">niño</getItReturn>
</getItResponse>
</soapenv:Body>
</soapenv:Envelope>
And with a Content-type: text/xml;charset=ISO-8859-1
Now, the String should have come out as UTF-8 like the XML declaration
says and it should have been 5 bytes, because n-tilde is encoded as two
bytes in UTF-8 (0xB3 0xB1). However it came out as a single byte (0xF1).
Well, anybody knows if this has been fixed in later versions, or if
there is some parameter in the deployment or de web.xml or *somewhere*
where I can set the response to have the right encoding and serializing?
BarZ
Internet Banda Ancha Todo el Dia desde $u 490 por mes!
______________________________________________________
http://www.internet.com.uy - En Uruguay somos internet