Thanks Thilina. I am just printing the AXIOM message on the server. I was
expecting to see the XOP include inside the SOAP body.

Many thanks
Meeraj


On 11/3/07, Thilina Gunarathne <[EMAIL PROTECTED]> wrote:
>
> Hi,
> I could not find any obvious mistakes in your code..
>
> What is the tool you are using to trace the messages.. In case you are
> using SOAPMonitor,  it does not show attachments.. Try using TCPMON
> (http://ws.apache.org/commons/tcpmon)..
>
> thanks,
> Thilina
>
> On 11/2/07, Meeraj Kunnumpurath <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > I have been looking at wiriting a client using AXIOM for sending
> > binary attachments. The code is shown below,
> >
> >    public void testExchange() throws Exception {
> >
> >        DataHandler dataHandler = new DataHandler(new FileDataSource("
> > Picture.jpg"));
> >
> >        OMFactory fac = OMAbstractFactory.getOMFactory();
> >
> >        OMElement request = fac.createOMElement("data", null);
> >
> >        OMText binaryData = fac.createOMText(dataHandler, true);
> >        binaryData.setOptimize(false);
> >
> >        request.addChild(binaryData);
> >
> >        OMElement method = fac.createOMElement("exchange", null);
> >        method.addChild(request);
> >
> >        Options options = new Options();
> >        options.setTo(new
> > EndpointReference("http://localhost:8900/axis2/exchange";));
> >
> > options.setProperty(Constants.Configuration.ENABLE_MTOM,
> > Constants.VALUE_TRUE );
> >
> >        ServiceClient sender = new ServiceClient();
> >        sender.setOptions(options);
> >
> >        sender.sendReceive(method);
> >
> >    }
> >
> > Unfortunately, the message is being sent to the server inlined without
> > any mime parts. I have tried SWA instead of MTOM, but the same result.
> > Any pointers would be highly appreciated. The message trace for
> > request is shown below,
> >
> > <?xml version='1.0' encoding='utf-8'?>
> > <soapenv:Envelope
> >
> > xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
> > <soapenv:Body>
> >    <exchange>
> >      <data>/9j/4RBZRXhpZgA.....38z/2Q==</data>
> >    </exchange>
> > </soapenv:Body>
> > </soapenv:Envelope>
> >
> > Kind regards
> > Meeraj
> >
>
>
> --
> Thilina Gunarathne  - http://thilinag.blogspot.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to