Author: darran.lofthouse(a)jboss.com
Date: 2007-08-13 11:21:30 -0400 (Mon, 13 Aug 2007)
New Revision: 4339
Modified:
legacy/branches/dlofthouse/ASPATCH-260/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/DeserializerSupport.java
Log:
Set the encoding.
Modified:
legacy/branches/dlofthouse/ASPATCH-260/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/DeserializerSupport.java
===================================================================
---
legacy/branches/dlofthouse/ASPATCH-260/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/DeserializerSupport.java 2007-08-13
15:06:55 UTC (rev 4338)
+++
legacy/branches/dlofthouse/ASPATCH-260/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/DeserializerSupport.java 2007-08-13
15:21:30 UTC (rev 4339)
@@ -24,6 +24,7 @@
// $Id$
import java.io.ByteArrayOutputStream;
+import java.io.UnsupportedEncodingException;
import javax.xml.namespace.QName;
import javax.xml.rpc.encoding.Deserializer;
@@ -97,7 +98,7 @@
ByteArrayOutputStream baos = new ByteArrayOutputStream(1024);
StreamResult streamResult = new StreamResult(baos);
tf.newTransformer().transform(source, streamResult);
- xmlFragment = new String(baos.toByteArray());
+ xmlFragment = new String(baos.toByteArray(),"UTF-8");
if (xmlFragment.startsWith("<?xml"))
{
int index = xmlFragment.indexOf(">");
@@ -109,6 +110,10 @@
{
WSException.rethrow(e);
}
+ catch (UnsupportedEncodingException e)
+ {
+ WSException.rethrow(e);
+ }
return xmlFragment;
}