You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by ve...@apache.org on 2009/01/12 00:21:53 UTC
svn commit: r733539 -
/webservices/axis2/trunk/java/modules/saaj/test/org/apache/axis2/saaj/integration/IntegrationTest.java
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) {