axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Meeraj Kunnumpurath" <mkunnumpur...@googlemail.com>
Subject Re: MTOM Support
Date Sat, 03 Nov 2007 08:03:26 GMT
Hi,

This is the output from tcpmon, the multipart message is created,
however, the data is still inlined in the SOAP body.

POST /axis2/exchange HTTP/1.1
Content-Type: multipart/related;
boundary=MIMEBoundaryurn_uuid_0ABA9A4117F4C627061194076883448;
type="application/xop+xml";
start="0.urn:uuid:0ABA9A4117F4C627061194076883449@apache.org";
start-info="text/xml"
SOAPAction: "urn:anonOutInOp"
User-Agent: Axis2
Host: 127.0.0.1:8888
Content-Length: 503

--MIMEBoundaryurn_uuid_0ABA9A4117F4C627061194076883448
Content-Type: application/xop+xml; charset=UTF-8; type="text/xml"
Content-Transfer-Encoding: binary
Content-ID: <0.urn:uuid:0ABA9A4117F4C627061194076883449@apache.org>

<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><exchange><data>c29tZSBkdW1wIGRhdGEK</data></exchange></soapenv:Body></soapenv:Envelope>
--MIMEBoundaryurn_uuid_0ABA9A4117F4C627061194076883448--

Ta
Meeraj

On 11/3/07, Meeraj Kunnumpurath <mkunnumpurath@googlemail.com> wrote:
> 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 <csethil@gmail.com> 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 < mkunnumpurath@googlemail.com> 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:
> axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message