Wildfly 10 JAX-WS attachements : MTOM threshold not working as expected (?)

Viewed 502

I have JAX-WS endpoint defined with @MTOM annotation and set threshold as below. So I expect any attachments less 5MB shall be sent inline as base64binary. But the soap response is always returned as MTOM for even small files.

Is this expected behavior? How can I enforce this flexibility otherwise ?

@HandlerChain(file="/handler-chain.xml")
@MTOM(threshold=5242880) // 5MB limit for inline soap attachements else MTOM
public class WSImpl {

I'm interested in this behavior. This is not the spec, but at least Metro implementation behaves like that (at least old version) in jboss 5. The Apache CXF does always sends as MTOM if enabled and does not care about threshold.

0 Answers
Related