[jbossws-issues] [JBoss JIRA] Updated: (JBWS-2190) Default encoding is used to decode responses.

Alessio Soldano (JIRA) jira-events at lists.jboss.org
Wed Jun 11 17:22:15 EDT 2008


     [ http://jira.jboss.com/jira/browse/JBWS-2190?page=all ]

Alessio Soldano updated JBWS-2190:
----------------------------------

    Fix Version/s:  jbossws-native-3.0.3

> Default encoding is used to decode responses.
> ---------------------------------------------
>
>                 Key: JBWS-2190
>                 URL: http://jira.jboss.com/jira/browse/JBWS-2190
>             Project: JBoss Web Services
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: jbossws-native
>    Affects Versions: jbossws-native-3.0.1
>         Environment: JBoss AS 4.2, JAXWS 3.0.1 Native.
>            Reporter: Slawomir Wojtasiak
>             Fix For:  jbossws-native-3.0.3
>
>         Attachments: patch_encoding.txt
>
>
> During response processing (on client side) JaxWS Native uses default JVM character encoding to read data from inputStream but there is always UTF-8 used as a default encoding when response is sent to the client.
> Following code sets encoding while response is prepared and sent on the server side:
> boolean writeXML = isWriteXMLDeclaration();
> String charsetEncoding = getCharSetEncoding();
> SOAPElementWriter writer = new SOAPElementWriter(outs, charsetEncoding);
> // Implementation of getCharSetEncoding().
> private String getCharSetEncoding() throws SOAPException
> {
>       String charsetName = (String)getProperty(CHARACTER_SET_ENCODING);
>       if (charsetName == null)
>          charsetName = "UTF-8";
>       return charsetName;
> }
> On the client side there is no character encoding set when input stream is passed to the xml parser, so default encoding is used to decode it (which is ISO-8859-1 in my case and I can't change it only because JaxWS needs it).
> I'm sure that DEFAULT encoding should be the same during processing requests and responses.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jbossws-issues mailing list