File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes Client Apache Axis java to save base64Binary Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Client Apache Axis java to save base64Binary" Watch "Client Apache Axis java to save base64Binary" New topic
Author

Client Apache Axis java to save base64Binary

Ould Nadif
Ranch Hand

Joined: Jan 21, 2004
Posts: 184
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 ]

We are ones that build the world, thus build it well.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42913
    
  68
You could use this class to perform base64 en-/decoding or Jakarta Commons Codec.
Ould Nadif
Ranch Hand

Joined: Jan 21, 2004
Posts: 184
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

Joined: Jul 13, 2001
Posts: 3150
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'.


Spritle Software Blogs
Ould Nadif
Ranch Hand

Joined: Jan 21, 2004
Posts: 184
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Client Apache Axis java to save base64Binary