cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <>
Subject Re: Looking for advice / criticism (polite hopefully) of my implementation of operation level MTOM configuration
Date Mon, 21 Mar 2016 17:00:10 GMT

> On Mar 20, 2016, at 7:57 PM, Jason Pell <> wrote:
> I wanted to be able to turn MTOM on and off based on the content of the
> operation in question.  I wanted this to work as a CXF feature available on
> either the client or server.  What I have come up with is available here:
> I used reflection to figure out if mtom applicable data types are in use.
> For now in my code I always make sure to use a @XmlMimeType with the
> DataHandler, so I use that logic in my code.
> What I am really after is whether any of you are aware of a better way,
> presumeably by looking at the service model itself.  Any initial guidance
> for where I should start would be appreciated.

Well, I guess my first thought is anything that is byte[] can be output via MTOM.   It’s
not just stuff that has XmlMimeType.   Thus, there are certainly cases that this will miss.

Instead of using reflection, you could grab the XmlSchema type from the message/parts and
scan through it looking for xsd:base64binary or xsd;hexBin.   

Daniel Kulp -
Talend Community Coder -

View raw message