Bug 1379335

Summary: [GSS] (6.4.z) CXF Web Service with activated MTOM always creates multipart message
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Lami Akagwu <lakagwu>
Component: Web, Web ServicesAssignee: Petr Jurak <pjurak>
Status: CLOSED NOTABUG QA Contact: Radim Hatlapatka <rhatlapa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.4.10CC: bmaxwell, msochure, pjurak, ppenicka, rmaucher
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-03-01 12:24:12 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Lami Akagwu 2016-09-26 12:12:30 UTC
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:

Comment 2 Petr Jurak 2016-10-26 06:34:18 UTC
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.