[jbossws-commits] JBossWS SVN: r4301 - in stack/native/branches/dlofthouse/JBWS-1763: src/main/java/org/jboss/ws/core/binding and 1 other directory.

jbossws-commits at lists.jboss.org jbossws-commits at lists.jboss.org
Thu Aug 9 10:03:59 EDT 2007


Author: darran.lofthouse at jboss.com
Date: 2007-08-09 10:03:59 -0400 (Thu, 09 Aug 2007)
New Revision: 4301

Modified:
   stack/native/branches/dlofthouse/JBWS-1763/.classpath
   stack/native/branches/dlofthouse/JBWS-1763/src/main/java/org/jboss/ws/core/binding/DeserializerSupport.java
Log:
Set the encoding.

Modified: stack/native/branches/dlofthouse/JBWS-1763/.classpath
===================================================================
--- stack/native/branches/dlofthouse/JBWS-1763/.classpath	2007-08-09 14:02:03 UTC (rev 4300)
+++ stack/native/branches/dlofthouse/JBWS-1763/.classpath	2007-08-09 14:03:59 UTC (rev 4301)
@@ -38,5 +38,6 @@
 	<classpathentry kind="lib" path="thirdparty/junit.jar"/>
 	<classpathentry kind="lib" path="thirdparty/jbossws-common.jar" sourcepath="thirdparty/jbossws-common-src.zip"/>
 	<classpathentry kind="lib" path="thirdparty/jbossws-spi.jar" sourcepath="thirdparty/jbossws-spi-src.zip"/>
+	<classpathentry kind="lib" path="thirdparty/ejb3.deployer/jboss-ejb3.jar"/>
 	<classpathentry kind="output" path="output/eclipse"/>
 </classpath>

Modified: stack/native/branches/dlofthouse/JBWS-1763/src/main/java/org/jboss/ws/core/binding/DeserializerSupport.java
===================================================================
--- stack/native/branches/dlofthouse/JBWS-1763/src/main/java/org/jboss/ws/core/binding/DeserializerSupport.java	2007-08-09 14:02:03 UTC (rev 4300)
+++ stack/native/branches/dlofthouse/JBWS-1763/src/main/java/org/jboss/ws/core/binding/DeserializerSupport.java	2007-08-09 14:03:59 UTC (rev 4301)
@@ -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;
    }




More information about the jbossws-commits mailing list