You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Matt Friedman <ma...@gmail.com> on 2009/01/08 18:57:14 UTC

enableMTOM=optional setting question - MTOM-aware clients vs. non-MTOM aware clients

Hi,

We are doing some tests using enableMTOM=optional. I did search the
lists quite a bit, but I'm still a bit confused about the following.

We originally built the service for MTOM aware clients but our
assumption (as often happens) turns out to be incorrect. Some of the
clients will not be MTOM aware whatsoever. In fact some of the clients
will be WebSphere web service clients (non Axis2 / non-MTOM).  The
methods in question return PDF files along with other information.

So, the question is: if we set enableMTOM=optional and we have some
clients that are MTOM aware and some that are MTOM oblivious, will we
get the expected result?

In my mind the expected result would be that the non-MTOM clients will
get base64 responses, while the MTOM aware clients will get the
optimized MIME responses. Is this correct?

Also, if the above is true, then how does the service determine if the
client is MTOM aware or not?

Many thanks,

-- 
-- Matt Friedman

Re: enableMTOM=optional setting question - MTOM-aware clients vs. non-MTOM aware clients

Posted by Thilina Gunarathne <cs...@gmail.com>.
Hi,
When EnableMTOM is set to "optional", Axis2 will reply back using MTOM if it
received a MTOM message or otherwise if it did not receive a MTOM message.
Receiving a MTOM message does not necessaraly mean that the message needs to
have attachments. It can just be that the SOAP message is just wrapped by
MTOM (MIME+required content type headers). Your MTOM enables clients can
send the requests using MTOM and get back the attachment using MTOM, while
other clients will get a base64encoded version of the data.

thanks,
Thilina

PS: According to what I have heard, above behaviour is similar to .net
behaviour.

On Thu, Jan 8, 2009 at 12:57 PM, Matt Friedman <ma...@gmail.com>wrote:

> Hi,
>
> We are doing some tests using enableMTOM=optional. I did search the
> lists quite a bit, but I'm still a bit confused about the following.
>
> We originally built the service for MTOM aware clients but our
> assumption (as often happens) turns out to be incorrect. Some of the
> clients will not be MTOM aware whatsoever. In fact some of the clients
> will be WebSphere web service clients (non Axis2 / non-MTOM).  The
> methods in question return PDF files along with other information.
>
> So, the question is: if we set enableMTOM=optional and we have some
> clients that are MTOM aware and some that are MTOM oblivious, will we
> get the expected result?
>
> In my mind the expected result would be that the non-MTOM clients will
> get base64 responses, while the MTOM aware clients will get the
> optimized MIME responses. Is this correct?
>
> Also, if the above is true, then how does the service determine if the
> client is MTOM aware or not?
>
> Many thanks,
>
> --
> -- Matt Friedman
>



-- 
Thilina Gunarathne  - http://thilinag.blogspot.com