axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sc...@apache.org
Subject cvs commit: xml-axis/java/src/org/apache/axis SOAPPart.java
Date Tue, 27 Aug 2002 20:47:01 GMT
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 ) {
  
  
  

Mime
View raw message