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 ia...@apache.org on 2004/03/05 06:20:46 UTC
cvs commit: ws-axis/java/src/org/apache/axis/transport/http SimpleAxisWorker.java
ias 2004/03/04 21:20:46
Modified: java/src/org/apache/axis/transport/http
SimpleAxisWorker.java
Log:
Added support of synchronization between request and response.
Revision Changes Path
1.34 +13 -0 ws-axis/java/src/org/apache/axis/transport/http/SimpleAxisWorker.java
Index: SimpleAxisWorker.java
===================================================================
RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/transport/http/SimpleAxisWorker.java,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- SimpleAxisWorker.java 25 Feb 2004 14:02:45 -0000 1.33
+++ SimpleAxisWorker.java 5 Mar 2004 05:20:46 -0000 1.34
@@ -33,6 +33,8 @@
import org.w3c.dom.Document;
import javax.xml.namespace.QName;
+import javax.xml.soap.SOAPMessage;
+
import java.io.OutputStream;
import java.io.ByteArrayInputStream;
import java.net.InetAddress;
@@ -373,6 +375,12 @@
}
msgContext.setRequestMessage(requestMsg);
+ // put character encoding of request to message context
+ // in order to reuse it during the whole process.
+ String requestEncoding = (String) requestMsg.getProperty(SOAPMessage.CHARACTER_SET_ENCODING);
+ if (requestEncoding != null) {
+ msgContext.setProperty(SOAPMessage.CHARACTER_SET_ENCODING, requestEncoding);
+ }
// set up session, if any
if (server.isSessionUsed()) {
@@ -440,6 +448,11 @@
}
}
+ // synchronize the character encoding of request and response
+ String responseEncoding = (String) msgContext.getProperty(SOAPMessage.CHARACTER_SET_ENCODING);
+ if (responseEncoding != null) {
+ responseMsg.setProperty(SOAPMessage.CHARACTER_SET_ENCODING, responseEncoding);
+ }
// Send it on its way...
OutputStream out = socket.getOutputStream();
out.write(HTTP);