You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fx-dev@ws.apache.org by ji...@apache.org on 2004/05/05 15:16:56 UTC

[jira] Closed: (WSFX-1) WsDoAllSender does not correctly handles international characters

Message:

   The following issue has been closed.

   Resolver: Davanum Srinivas
       Date: Wed, 5 May 2004 6:15 AM

Fixed the bug. please try latest cvs. make sure you use the axis jar in the lib directory.

-- dims
---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/WSFX-1

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: WSFX-1
    Summary: WsDoAllSender does not correctly handles international characters
       Type: Bug

     Status: Closed
   Priority: Major
 Resolution: FIXED

    Project: WSFX
 Components: 
             WSS4J

   Assignee: 
   Reporter: Rodrigo Ruiz

    Created: Tue, 27 Apr 2004 3:18 AM
    Updated: Wed, 5 May 2004 6:15 AM
Environment: Any platform
JDK 1.4
file.encoding != UTF-8 (client-side)

Description:
The request is corrupted when it contains international characters.

I have no access to the CVS, so it's difficult to me to provide a patch as I would like, but I have tracked the bug down to the following code in WSDoAllSender class:


public void invoke(MessageContext mc) throws AxisFault {

  ...

  ByteArrayOutputStream os = new ByteArrayOutputStream();
  XMLUtils.outputDOM(doc, os, true);
  String osStr = os.toString();

  ...

}

The outputDOM seems to generate the XML string in UTF-8, but if file.encoding has another value, the os.toString() call obtains a corrupted string.

The following replacement works for me:

  String osStr = null;
  try {
    osStr = os.toString("UTF-8");
  }
  catch (UnsupportedEncodingException e) {
    osStr = os.toString();
  }




---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira