Jon cleared this up for us by replacing the infected code.

Daniel Rall <[EMAIL PROTECTED]> writes:

> Hey Raymond.  As soon as we get the Base64 class licensing issue
> cleared up with Kevin Kelley I can commit your changes.
>
> Raymond Penners <[EMAIL PROTECTED]> writes:
>
>> Hi all,
>>
>> I am using your XML-RPC (1.0) in an applet. At first, things didn't
>> work because org.apache.xmlrpc.applet.XmlRpcSupport referred to
>> sun.misc.BASE64Encoder for encoding/decoding base64 data. This is Sun
>> specific and does not work on all browsers. On my setup, things only
>> functioned correctly only using Netscape 4.x. Both IE, and Mozilla
>> failed.
>>
>> Other users also encountered this problem, with no solution offered:
>>
>> http://helma.org/archives/xmlrpc/2000-August/000164.html
>>
>> I easily fixed this by removing the dependency on sun.misc.BASE64* to
>> org.apache.xmlrpc.Base64. Now, it works across all browsers.
>>
>> Please let me know what you think of this patch. I've successfully
>> transferred binary data between a PHP XML-RPC server and an XML-RPC
>> applet (both ways).
>>
>> Regards,
>> -- 
>> Raymond Penners -*- [EMAIL PROTECTED] -*- www.dotsphinx.com
>> --- SimpleXmlRpcClient.java.orig     Thu Jan 31 14:08:24 2002
>> +++ SimpleXmlRpcClient.java  Thu Jan 31 14:09:17 2002
>> @@ -62,6 +62,7 @@
>>  import java.util.*;
>>  import java.text.*;
>>  import java.net.*;
>> +import org.apache.xmlrpc.Base64;
>>  
>>  
>>  /**
>> @@ -188,8 +189,7 @@
>>          writer.endElement ("dateTime.iso8601");
>>      } else if (what instanceof byte[]) {
>>          writer.startElement ("base64");
>> -        sun.misc.BASE64Encoder encoder = new sun.misc.BASE64Encoder ();
>> -        writer.write (encoder.encodeBuffer ((byte[]) what));
>> +        writer.write (Base64.encode ((byte[]) what));
>>          writer.endElement ("base64");
>>      } else if (what instanceof Vector) {
>>          writer.startElement ("array");
>> @@ -543,12 +543,7 @@
>>                      }
>>                      break;
>>                  case BASE64:
>> -                    sun.misc.BASE64Decoder decoder = new sun.misc.BASE64Decoder ();
>> -                    try {
>> -                        value = decoder.decodeBuffer (cdata);
>> -                    } catch (IOException x) {
>> -                        throw new RuntimeException ("Error decoding base64 tag: 
>"+x.getMessage ());
>> -                    }
>> +                    value = Base64.decode (cdata.toCharArray());
>>                      break;
>>                  case STRING:
>>                      value = cdata;

Reply via email to