in reply to Re: Re: Sending application-specific XML as a string paremeter to an RPC::XML method.
in thread Sending application-specific XML as a string paremeter to an RPC::XML method.

Ok, the large ammount of time spent transferring base64 encoded data appears to be spent in the client, receiving (but not decoding) the encoded data. It appears to be related to the number of newlines in the data, because if I strip them, the data is transferred in a couple seconds. Is there a way to encode the data such that there are no newlines?

  • Comment on Re: Re: Re: Sending application-specific XML as a string paremeter to an RPC::XML method.

Replies are listed 'Best First'.
Re: Re: Re: Re: Sending application-specific XML as a string paremeter to an RPC::XML method.
by nenbrian (Acolyte) on Mar 30, 2004 at 22:49 UTC

    Ok, this is a little bit gross, but it is possible to use the MIME::Base64::encode_base64() method to do the encoding, and you can specify that you don't want it to insert newlines. This works, but you have to be careful to decode the data on the other end (i.e. it doesn't happen automagically), because RPC::XML doesn't know that its payload is base64 encoded. It does know if you use the XML::RPC::base64->new() method, which wraps the data in <base64> tags). Not totally ideal, but I think I have my solution. :^)

    Thanks to all for your suggestions!
    -brian