cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <>
Subject Re: Controlling mtom using client headers.
Date Tue, 12 Aug 2014 13:26:07 GMT

On Aug 10, 2014, at 10:47 PM, Jason Pell <> wrote:

> I cant seem to find code that controls mtom based on what a client can
> handle. My understanding is the Accept header should be used. If I have a
> Accept header which is either a wild card or includes application/xop+xml
> use mtom if con figured on endpoint otherwise fall back to inlined base 64.
> I tried this and it did not work. I am very surprised this is not working.
> Perhaps I am missing something.

The tricky part is that this would need to be disabled by default.   Nothing in any of the
specs (MTOM, JAX-WS, SOAP, etc…) really allows for any change of behavior based on the Accept
header.    In particular, for JAX-WS, if MTOM is enabled on the service, we HAVE to respond
with an MTOM message no matter what the Accept header say.   Also, there is no requirement
in any of those specs that we even have to set an Accept header.   Thus, many toolkits may
not set it or, if they do, set it to some generic value (like CXF always sets it to "*/*”.
   I just check the JAX-WS RI and it ALWAYS sets it to "text/xml; multipart/related”  (for
soap 1.1) whether MTOM is turned on on the client or not.    Axis2 never sends any Accept
header at all.   No idea what .NET and some of the other do.

Daniel Kulp -
Talend Community Coder -

View raw message