axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Partha Pal" <part...@kovair.com>
Subject RE: How to enable MTOM support
Date Wed, 02 Sep 2009 05:54:50 GMT
1.5.0_13 

 

From: Chinmoy Chakraborty [mailto:cchinu@gmail.com] 
Sent: Wednesday, September 02, 2009 11:16 AM
To: axis-user@ws.apache.org
Subject: Re: How to enable MTOM support

 

which version of JDK you are using? Axis2 1.5 requires JDK 1.5 onwards.

 

Chinmoy

On Wed, Sep 2, 2009 at 10:16 AM, Partha Pal <parthap@kovair.com> wrote:

Hi,

 

I am writing an axis2 client to get attachment from hosted .NET service.
I am a newbie so  using the example from
http://ws.apache.org/axis2/1_0/mtom-guide.html   I am using axis2 1.5
from Eclipse 3.3 , this code will eventually go as a plugin. The problem
is the code :- 

 

ServiceClient sender = new ServiceClient();        

        Options options = new Options();

        options.setTo(targetEPR); 

        // enabling MTOM

        options.set(Constants.Configuration.ENABLE_MTOM,
Constants.VALUE_TRUE);

        options.setTransportInfo(Constants.TRANSPORT_HTTP,

                Constants.TRANSPORT_HTTP, false);

 
options.setSoapVersionURI(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI);

 

        OMElement result = sender.sendReceive(payload);

        OMElement ele = result.getFirstElement();

        OMText binaryNode = (OMText) ele.getFirstOMChild();

        

        // Retrieving the DataHandler & then do whatever the processing
to the data

        DataHandler actualDH;

        actualDH = binaryNode.getDataHandler();

        Image actualObject = new
ImageIO().loadImage(actualDH.getDataSource()

                .getInputStream());

 

 

Is not compiling . There is no  

      options.set(Constants.Configuration.ENABLE_MTOM,
Constants.VALUE_TRUE);

 

      I am using org.apache.axis2.client.Options . Am I missing some
thing ? could anybody please point me any other resource for MTOM with
Axis2 !

 

Thanks,

Partha

 

 


Mime
View raw message