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 Axis2 client reading MTOM objects. Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Web Services
Reply Bookmark "Axis2 client reading MTOM objects." Watch "Axis2 client reading MTOM objects." New topic
Author

Axis2 client reading MTOM objects.

kumartrun kumar
Greenhorn

Joined: Feb 08, 2011
Posts: 1

Hi All,

I am having litter troouble reading the binary MTOM objects in Axis client.To give you a breif back ground i am using Axis2 1.4 that is still based on java 1.4.When i create the request and execute the operation on the web service i see the below xml as the response.Now how do i read the included binary byte string .I dont have any issue reading the byte array if i use Axis2 1.5 but i cant use Java 1.5.Please help in reading the byte array in Axis2 1.4 way.

<ns2:content>
<ns2:mimeType>image/jpeg</ns2:mimeType>
<ns2rgFileName>file.jpg</ns2rgFileName>
<ns2:bytes>
<xop:Include href="cid:urn:uuid:1F45AA97BE8FD402921297184208573@apache.org" xmlns:xop="http://www.w3.org/2004/08/xop/include"/>
</ns2:bytes>
</ns2:content>


If i use Axis2 1.5 i see the following response message.The bytes array is included in the message itself.This is very easy to read on response i am calling getContent().getbytes() and it return the byte array.


<ns2:content>
<ns2:mimeType>image/jpeg</ns2:mimeType>
<ns2rgFileName>file.jpg</ns2rgFileName>
<ns2:bytes>23432sdfasfsasdfsd fsadfds </ns2:bytes>
</ns2:content>
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Axis2 client reading MTOM objects.
 
Similar Threads
Passing an object to a Browser
Passing multiple images to Browser
Web services feature pack for WAS 6.1
Binary data to Image File
Gray scale unformatted images