Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Axis2 client reading MTOM objects.  RSS feed

 
kumartrun kumar
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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>
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!