CXF Web Service with activated MTOM always creates multipart message

Solution In Progress - Updated -

Issue

  • multipart/related messages exchanged for @MTOM annotated endpoint even if no attachment is included
  • Java class with @WebService annotation and also @MTOM (enabled =true) has two methods with @WebMethod annotation: one returns binary data , the other does not.
    When calling the second method i.e. with soapui, the raw data returned is multi-parted even though it is not required
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: multipart/related; type="application/xop+xml"; boundary="--uuid:febe2942-996f-4c83-a4ec..."; start="<root.message@cxf.apache.org>"; start-info="application/soap+xml"
Content-Length: 574
Date: Tue, 20 Sep 2016 12:43:09 GMT

----uuid:febe2942-996f-4c83-a4ec.....
Content-Type: application/xop+xml; charset=UTF-8; type="application/soap+xml"
Content-Transfer-Encoding: binary
Content-ID: <root.message@cxf.apache.org>

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
     <env:Header xmlns:env="http://www.w3.org/2003/05/soap-envelope"></env:Header>
    <soap:Body>
       <ns2:noBlobResponse xmlns:ns2="http://ws.example.com/framework/wstest/MTOMTestWS"><String>Da is' was :-) : Hallo</String></ns2:noBlobResponse>   
    </soap:Body>
</soap:Envelope>
----uuid:febe2942-996f-4c83-a4ec...--

With JBoss EAP 5, the message was not multi-part in this situation.

Environment

Red Hat JBoss Enterprise Application Platform (EAP) 6.4.10

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.