[jbossws-issues] [JBoss JIRA] Created: (JBWS-2190) Default encoding is used to decode responses.
Sławomir Wojtasiak (JIRA)
jira-events at lists.jboss.org
Wed May 21 08:10:01 EDT 2008
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)
Affects Versions: jbossws-native-3.0.1
Environment: JBoss AS 4.2, JAXWS 3.0.1 Native.
Reporter: Sławomir Wojtasiak
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