cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <>
Subject Re: Enable MTOM for a specific method
Date Thu, 10 Feb 2011 00:31:53 GMT
On Wednesday 09 February 2011 1:24:24 pm Hardeep Singh wrote:
> Hi,
> Is it possible to enabled MTOM for only a specific method in the Web
> Service?
> I am using this way to enable MTOM.
>         JaxWsServerFactoryBean factory = new JaxWsServerFactoryBean();
>         Map<String, Object> mtomProperty = new HashMap<String, Object>();
>         mtomProperty.put("mtom-enabled", Boolean.TRUE);
>         factory.setProperties(mtomProperty);
> This enables it for all the methods, changes the content-type, adds message
> boundaries etc. Please let me know if this cannot be done.

The only way this could be done would be to add an interceptor at the very 
start of the OUT chain that would look at the operation and set the "mtom-
enabled", Boolean.TRUE flag on the message just like above.   

Daniel Kulp

View raw message