I think that from the client side it would either be on or off.  That's
how .NET does it, and that seems easiest.

If you really wanted to also support "optional" on the client side, I
can see two potential ways:

1) Choose based on size of the payload.  If the payload is over x kb,
then use MTOM.
2) Assume MTOM, retry on failure.  First send the request using MTOM.
If it fails, retry using straight text/xml.  And of course, remember
what happened so every request isn't sent across the wire twice.

Both options above (for an optional MTOM setting on client) have some
ramifications though-- which is why straight on or off might be best.

Thanks for the other fixes, by the way.  I've downloaded and built the
source from SVN.  Looks good!

-Chris

-----Original Message-----
From: Dan Diephouse [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 18, 2007 11:22 AM
To: cxf-user@incubator.apache.org
Subject: Re: MTOM "By Request"

How would this work from the Client side? Would it just be always or
never
then? I don't think there's a way to detect whether or not MTOM should
be
used on the client side of things.

BTW - I fixed your bugs in SVN. We haven't published a new snapshot
quite
yet though. That should happen later today I would think.

- Dan

On 4/18/07, Christopher Moesel <[EMAIL PROTECTED]> wrote:
>
> According to the link below, the .NET 2.0 w/ WSE 3.0 server supports a
> feature like this:
>
> <quote from link>
> Note: There are three server MTOM modes: "optional", "always", and
> "never".
>
> Always means that the service "always" requires MTOM messages from the
> client and will "always" return response messages using MTOM.
>
> Never means that MTOM will never be used-and the service will reject
> MTOM requests.
>
> Optional (the default) means the service will respond in kind to the
> type of message sent by the client. So if the client sends an MTOM
> request, it will respond with an MTOM response.
> </quote from link>
>
>
http://www.agilefactor.com/agiledamon/2006/01/mtom-and-microsoft-web-ser
> vice.html
>
> -Chris
>
> -----Original Message-----
> From: Christopher Moesel [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, April 18, 2007 10:35 AM
> To: cxf-user@incubator.apache.org
> Subject: MTOM "By Request"
>
> I don't know if this goes against any specs or is too difficult to
> implement, but it seems to me that this would be a neat feature:
>
> MTOM By Request:
> - If a request comes in using MTOM, then respond using MTOM.
> - If a request comes in using text/xml, then respond with test/xml.
>
> This way, a single deployed service can support both MTOM-enabled and
> non-MTOM-enabled clients.
>
> Any thoughts?
>
> -Chris
>



-- 
Dan Diephouse
Envoi Solutions
http://envoisolutions.com | http://netzooid.com/blog

Reply via email to