DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15133>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15133

Problems serializing german umlauts





------- Additional Comments From [EMAIL PROTECTED]  2003-06-12 12:06 -------
I think I found the reason for the problem in version 1.0 and it seems to be the
same in 1.1RC2. I had the same problem, all characters with a code greater 0x7f
were damaged. But this was gone, when I switched the loglevel to INFO. My
SOAP-response was encoded in ISO-8859-1, but axis ignored the HTTP-Header and
the xml declaration, because of the debug loglevel. At the end of the method
readFromSocket in class org.apache.axis.transport.http.HTTPSender is the
loglevel checked. If this is set to debug the getSOAPPartAsString() of
org.apache.axis.Message is called. This calls getAsString() in class
org.apache.axis.SOAPPart. This method calls getAsBytes and builds a String with
the fixed encoding of UTF-8. When you do this with a iso-8859-1 byte stream you
end up with damaged umlauts. 

When the loglevel is set to info, the first method which gets the response from
SOAPPart is getAsSOAPEnvelope() and this reconginices that there is an input
stream from the socket and uses a InputSource with this input stream as
parameter. Then the xml is correctly parsed and encoding is set in
correspondense to the xml header.

The problem is the order in which getAsString and getAsSOAPEnvelope is called.
We get rid of this with loglevel info in 1.0 in JBoss 3.2.2beta and 1.1RC2 in
tomcat 4.1.

Bernd

Reply via email to