java - How to read string data from JAXBElement<byte[]> -
i have web-service returns data in below xml form
<epsbinaryex xmlns="http://eprise"> <errorstring>no error</errorstring> <errornum>1</errornum> <data>ajhsdjasjajadjhgasd</data> </epsbinaryex>
class epsbinaryex has getdata() method below
public jaxbelement<byte[]> getdata() { return data; }
my aim read data tag's content base64 string. calling webservice , trying read element in following way
pswebservice service = new pswebservice(); pswebservicesoap soap = service.getpswebservicesoap(); epsbinaryex base64data = soap.getuploadeddocument(token, pageid); system.out.println(base64data.getdata.getvalue());
this gives offset address output. tried using arrays.tostring(base64data.getdata().getvalue())
, (new string(base64data.getdata().getvalue())
well. first method gives me array of numbers , second method displays non-readable characters.
can please me out in reading data tag? need output "ajhsdjasjajadjhgasd" in above example.
any appreciated.
thanks, sam.
Comments
Post a Comment