axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [jira] Created: (AXIS-1355) SOAPPart.getAsString() assumes document is UTF-8 encoded
Date Mon, 10 May 2004 15:57:56 GMT

  A new issue has been created in JIRA.

View the issue:

Here is an overview of the issue:
        Key: AXIS-1355
    Summary: SOAPPart.getAsString() assumes document is UTF-8 encoded
       Type: Bug

     Status: Unassigned
   Priority: Major

    Project: Axis
             1.2 Beta

   Reporter: Michael Krumpus

    Created: Mon, 10 May 2004 8:57 AM
    Updated: Mon, 10 May 2004 8:57 AM

The method getAsString() in SOAPPart assumes that the document is UTF-8 encoded.  This does
not work correctly for ISO-8859-1 documents that contain characters with the high-order bit
on.  If one calls getAsString() on such a document before it is parsed (e.g. in a logging
handler of some sort), the document will not be read correctly -- I've seen it truncated at
the offending character.
The workaround is to ensure that any handlers deserialize the document first by making sure
getAsSOAPEnvelope() is called first, and then calling getAsString().
Interestingly, if the current form is a deserialized envelope and one wishes to have the raw
string for logging purposes, a subsequent call to getAsString() will cause the envelope to
be serialized to a string.  I would think that the SOAPPart object would hang on to a copy
of the String representation instead of serializing the document it just deserialized.  Keeping
the raw string and object graph in synch would be a problem however.

This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:

If you want more information on JIRA, or have a bug to report see:

View raw message