You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xmlrpc-dev@ws.apache.org by bu...@apache.org on 2003/05/07 22:23:28 UTC

DO NOT REPLY [Bug 19746] New: - XMLRPC applet fails to xmit Base64 coded data.

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19746>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19746

XMLRPC applet fails to xmit Base64 coded data.

           Summary: XMLRPC applet fails to xmit Base64 coded data.
           Product: XML-RPC
           Version: unspecified
          Platform: All
        OS/Version: Linux
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Source
        AssignedTo: rpc-dev@xml.apache.org
        ReportedBy: biglee@haslups.com


Package: org.apache.xmlrpc.applet
File: SimpleXmlRpcClient.java
Class: XMLWriter
Method: write(byte[])

Attempts to write a byte array to the response by calling the append method
on class StringBuffer with the byte array as an argument.  There is no specific
method for appending byte[] to a string buffer so the default behavior for 
appending an Object is used.  This is to append the result of calling toString()
on the object.  In the case of a byte array this results in sending
the symbolic object handle instead of the contents.

        /**
         *
         * @param text
         */
        public void write(byte[] text)
        {
            // This doesn't work... ->  buf.append(text);
            // This does... -v
            int size = text.length;
            for(int i=0;i<size; i++) {
            	buf.append((char)text[i]);
            }
        }