• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Client Apache Axis java to save base64Binary

 
Ould Nadif
Ranch Hand
Posts: 184
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I looking for a client Apache Axis (code java) in order to read base64Binary data and store/save it into a file.

I developped a web service based on SOAP. I used Apache Axis server side. You will find below XML data sent by my server. I used my browther to dipslay these data.

Thanks in advance for your help.

Ould Nadif

<?xml version="1.0" encoding="UTF-8" ?>
- <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <soapenv:Body>
- <composeResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<composeReturn xsi:type="xsd:base64Binary">AASUAACI9fwAiLn8ALn8CGC4AFSIuAAAuAAUiP
QACIj1/ACIlfwAufwAufxslAAAuAAAuAAEiPQAC/y8A</composeReturn>
</composeResponse>
</soapenv:Body>
</soapenv:Envelope>

Removed part of big binary data to ease reading : Balaji
[ May 16, 2006: Message edited by: Balaji Loganathan ]
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could use this class to perform base64 en-/decoding or Jakarta Commons Codec.
 
Ould Nadif
Ranch Hand
Posts: 184
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for your help. But that don't resolve my problem.
I need rather a client apache axis java to get my binary data.

Ould Nadif
 
Balaji Loganathan
author and deputy
Bartender
Posts: 3150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use Apache Axis WSDL2Java to generate client stubs(a set of classes to access your webservice), then you can use the above 'Ulf suggestions on reading the binary data'.
 
Ould Nadif
Ranch Hand
Posts: 184
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you. I could get my binay data by using that function:
byte[] Buffer = (byte[])call.invoke( new Object[] {in} );
FileOutputStream f=new FileOutputStream(fname);
f.write(Buffer);
f.close();

My only problem now is that the data is coded in 64 bits (base64Binary).
So that there's difference beetween tha data (server side) et (client side).

How to resolve the problem ?

Ould Nadif
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic