ws-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Wilson <...@wilson.co.uk>
Subject Re: How do you convert a base64 object to original object?
Date Fri, 04 Nov 2005 07:50:07 GMT

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



Mime
View raw message