Hi Dan,

Thanks so much for your response. Can you expand on what you mean by
message/parts?

Is this a reference to a cxf service model? If so can you point me a little
closer to where i would find it

I went looking in the ServiceInfo classes etc

I guess i should be able to find by hunting up the code that actually does
the Mtom encoding

Anything additional you can assist me to pinpoint would be appreciated
On 22 Mar 2016 4:00 am, "Daniel Kulp" <[email protected]> wrote:

>
> > On Mar 20, 2016, at 7:57 PM, Jason Pell <[email protected]> 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:
> >
> >
> https://github.com/pellcorp/JavaFirst/tree/cxf27/JavaFirst/src/main/java/com/pellcorp/cxf/mtom/
> >
> > 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
> [email protected] - http://dankulp.com/blog
> Talend Community Coder - http://coders.talend.com
>
>

Reply via email to