You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by sc...@apache.org on 2002/08/27 22:47:01 UTC
cvs commit: xml-axis/java/src/org/apache/axis SOAPPart.java
scheu 2002/08/27 13:47:01
Modified: java/src/org/apache/axis SOAPPart.java
Log:
SOAPPart.getAsBytes was setting the current message to FORM_STRING instead
of FORM_BYTES for the cases where the message is a FORM_SOAPENVELOPE or
FORM_FAULT.
This caused some performance hits when the message was retrieved later and
had to convert the string to a byte[] a second time. Also notice that the
comments in getContentLength imply that the byte form should be cached by
getAsBytes.
Revision Changes Path
1.42 +11 -6 xml-axis/java/src/org/apache/axis/SOAPPart.java
Index: SOAPPart.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/SOAPPart.java,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- SOAPPart.java 25 Aug 2002 14:00:02 -0000 1.41
+++ SOAPPart.java 27 Aug 2002 20:47:01 -0000 1.42
@@ -357,12 +357,17 @@
if ( currentForm == FORM_SOAPENVELOPE ||
currentForm == FORM_FAULT ){
- try{
- return getAsString().getBytes("UTF-8");
- }catch(UnsupportedEncodingException ue){
- log.debug("Exit: SOAPPart::getAsBytes");
- return getAsString().getBytes();
- }
+ // Set message to FORM_STRING and
+ // translate to bytes below
+ getAsString();
+
+
+ // try{
+ // return getAsString().getBytes("UTF-8");
+ // }catch(UnsupportedEncodingException ue){
+ // log.debug("Exit: SOAPPart::getAsBytes");
+ // return getAsString().getBytes();
+ //}
}
if ( currentForm == FORM_STRING ) {