0 Replies Latest reply on Jul 18, 2017 4:29 AM by Ulab S

    jboss-ws MTOM threshold not working

    Ulab S Newbie



      I have web services running with the standard Jboss-WS (Apache CXF ?)  that comes with Wildfly10.1 Final version. I have defined webservice to use MTOM and specified the threshold as say


      @MTOM(threshold=5242880) // 5MB limit for inline soap attachements else MTOM
      public class WSImpl{


      But still the soap response is MTOM for all the attachments and even for responses with no attachments. The response header is shown below.


      Transfer-Encoding: chunked
      Content-Type: multipart/related; type="application/xop+xml"; boundary="uuid:f047ffc2-9bf5-4a34-91ce-9494f2a51c8e"; start="<root.message@cxf.apache.org>"; start-info="text/xml"
      Content-Type: application/xop+xml; charset=UTF-8; type="text/xml"
      Content-Transfer-Encoding: binary
      Content-ID: <root.message@cxf.apache.org>



      The question is why the threshold value does not work the way it is expected ? I would like send attachments less than threshold value as inline.

      Can we not choose MTOM selectively once enabled depending on threshold size ?


      Also, I have defined the mtom threshold value in standalone.xml but it has the same effect.