On 3 Nov 2005, at 16:50, Starsscream Desepticon wrote:


I serialize objects and then encode them using base64, which the server returns to the client. The
client receives a byte array object, but I cannot decode it using
org.apache.commons.codec.binary.Base64. When I do Base64.decodeBase64() it says res is not a byte array. However the code below says the object is a byte array. How do you convert res to the
original object (in my case it's a object implementing SecretKey)?


Why are you Base64 encoding this?

If you pass an byte array using XML-RPC the XMP-RPC code will do the Bas64 encoding and decoding for you. Just send a btre array and recieve a byte array. Leave the encoding and decoding to the XML-RPC implementation.


John Wilson
The Wilson Partnership
http://www.wilson.co.uk


Reply via email to