Hide Forgot
Description of problem: 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 (e.g. with soapui), the raw data returned is multiparted (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-..."; start="<root.message.org>"; start-info="application/soap+xml" Content-Length: 574 Date: Tue, 20 Sep 2016 12:43:09 GMT --uuid:febe2942-..... Content-Type: application/xop+xml; charset=UTF-8; type="application/soap+xml" Content-Transfer-Encoding: binary Content-ID: <root.message.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"/><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-...-- With JBoss 5 the message was not multi-part in this situation. Known issue https://issues.jboss.org/browse/JBWS-3593 Impacts EAP 6 & 7 How reproducible: Always Steps to Reproduce: 1. 2. 3. Actual results: message multi-part Expected results: message was not multi-part Additional info:
This is not a bug, works as expected. Basically if MTOM is enabled, the message should like you posted. You can write your own interceptor to turn off MTOM feature dynamically (workaround) or request feature enhancement in CXF project.