axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From veit...@apache.org
Subject svn commit: r733539 - /webservices/axis2/trunk/java/modules/saaj/test/org/apache/axis2/saaj/integration/IntegrationTest.java
Date Sun, 11 Jan 2009 23:21:53 GMT
Author: veithen
Date: Sun Jan 11 15:21:51 2009
New Revision: 733539

URL: http://svn.apache.org/viewvc?rev=733539&view=rev
Log:
Fixed some careless charset encoding handling in testSendReceive_ISO88591_EncodedSOAPMessage.

Modified:
    webservices/axis2/trunk/java/modules/saaj/test/org/apache/axis2/saaj/integration/IntegrationTest.java

Modified: webservices/axis2/trunk/java/modules/saaj/test/org/apache/axis2/saaj/integration/IntegrationTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/saaj/test/org/apache/axis2/saaj/integration/IntegrationTest.java?rev=733539&r1=733538&r2=733539&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/saaj/test/org/apache/axis2/saaj/integration/IntegrationTest.java
(original)
+++ webservices/axis2/trunk/java/modules/saaj/test/org/apache/axis2/saaj/integration/IntegrationTest.java
Sun Jan 11 15:21:51 2009
@@ -177,6 +177,9 @@
         }
     }
 
+    // TODO: it is not clear how this method can give predictable results,
+    //       given that ByteArrayOutputStream#toString uses the platform default charset
+    //       encoding while SOAPMessage#writeTo may use another encoding!!!
     private String printSOAPMessage(final SOAPMessage msg) throws SOAPException, IOException
{
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         msg.writeTo(baos);
@@ -385,7 +388,8 @@
 
             printSOAPMessage(requestMessage);
             String responseStr = printSOAPMessage(response);
-            assertTrue(responseStr.indexOf("This is some text.Here are some special chars
: öÆÚ®¤") != -1);
+            assertEquals("This is some text.Here are some special chars : \u00F6\u00C6\u00DA\u00AE\u00A4",
+                         response.getSOAPBody().getElementsByTagName("something").item(0).getTextContent());
             assertTrue(responseStr.indexOf("echo") != -1);
             sCon.close();
         } catch (SOAPException e) {



Mime
View raw message