rineholt 02/02/12 07:45:19
Modified: java/src/org/apache/axis SOAPPart.java
Log:
Patch supplied by: Taras Shkvarchuk <[EMAIL PROTECTED]>
Revision Changes Path
1.9 +18 -3 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.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- SOAPPart.java 31 Jan 2002 22:21:11 -0000 1.8
+++ SOAPPart.java 12 Feb 2002 15:45:19 -0000 1.9
@@ -270,12 +270,22 @@
}
if ( currentForm == FORM_SOAPENVELOPE ||
- currentForm == FORM_FAULT )
- return getAsString().getBytes();
+ currentForm == FORM_FAULT ){
+ try{
+ return getAsString().getBytes("UTF-8");
+ }catch(UnsupportedEncodingException ue){
+ return getAsString().getBytes();
+ }
+ }
if ( currentForm == FORM_STRING ) {
- setCurrentMessage( ((String)currentMessage).getBytes(),
+ try{
+ setCurrentMessage( ((String)currentMessage).getBytes("UTF-8"),
+ FORM_BYTES );
+ }catch(UnsupportedEncodingException ue){
+ setCurrentMessage( ((String)currentMessage).getBytes(),
FORM_BYTES );
+ }
category.debug( "Exit: SOAPPart::getAsBytes" );
return( (byte[]) currentMessage );
}
@@ -304,8 +314,13 @@
}
if ( currentForm == FORM_BYTES ) {
+ try{
+ setCurrentMessage( new String((byte[])
currentMessage,"UTF-8"),
+ FORM_STRING );
+ }catch(UnsupportedEncodingException ue){
setCurrentMessage( new String((byte[]) currentMessage),
FORM_STRING );
+ }
category.debug( "Exit: SOAPPart::getAsString, currentMessage is "+
currentMessage );
return( (String) currentMessage );