dims 2003/03/06 06:48:08
Modified: java/src/org/apache/axis/transport/http
CommonsHTTPSender.java
Log:
Don't force the byte array into a string...Causes problems with DIME.
Revision Changes Path
1.12 +2 -10
xml-axis/java/src/org/apache/axis/transport/http/CommonsHTTPSender.java
Index: CommonsHTTPSender.java
===================================================================
RCS file:
/home/cvs/xml-axis/java/src/org/apache/axis/transport/http/CommonsHTTPSender.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- CommonsHTTPSender.java 6 Mar 2003 13:22:56 -0000 1.11
+++ CommonsHTTPSender.java 6 Mar 2003 14:48:08 -0000 1.12
@@ -75,6 +75,7 @@
import java.io.ByteArrayOutputStream;
import java.io.UnsupportedEncodingException;
+import java.io.ByteArrayInputStream;
import java.net.URL;
import java.util.Hashtable;
import java.util.StringTokenizer;
@@ -132,7 +133,7 @@
ByteArrayOutputStream baos = new ByteArrayOutputStream();
reqMessage.writeTo(baos);
- method.setRequestBody(bytesAsString(baos.toByteArray()));
+ method.setRequestBody(new ByteArrayInputStream(baos.toByteArray()));
method.setUseExpectHeader(false); // workaround for
// outbound chunking bug
// in httpclient
@@ -216,15 +217,6 @@
log.debug(Messages.getMessage("exit00",
"CommonsHTTPSender::invoke"));
}
- }
-
- private static String bytesAsString(byte[] b) {
- try {
- return new String(b, "UTF-8");
- } catch (UnsupportedEncodingException e) {
- // always supported
- throw new IllegalStateException(e.getMessage());
- } // end of try-catch
}
/**