On Wed, Sep 2, 2009 at 10:16 AM, Partha Pal <[email protected]> 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); > seems you don't have axis2-kernel jar in your class path. Add all the axis2/lib jars to your class path. thanks, Amila. > > > 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 > > > -- Amila Suriarachchi WSO2 Inc. blog: http://amilachinthaka.blogspot.com/
