cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Talbut <>
Subject Does optional MTOM really work?
Date Mon, 11 Jun 2012 04:52:29 GMT

I'm trying to get optional MTOM working with CXF 2.6.0, but when I send 
in a plain XML request I always get an MTOM response.

I have a test that has two client endpoints (one MTOM enabled and one 
not) and two server endpoints (one MTOM enabled and one not).
The server MTOM endpoint has a policy specified in the Spring file:
<beans xmlns=""

   <jaxws:endpoint id="targetRealMtom" implementor="#realImplementation" 
address="" bus="testTracking" >
       <entry key="mtom-enabled" value="true"/>
           <mtom:OptimizedMimeSerialization wsp:Optional="true" />

All four endpoints use the same WSDL file, so the only one that knows 
anything about the policy is the server MTOM endpoint.

What I need to happen is:
Client no MTOM = Server no MTOM => XML Request, XML Response
Client MTOM = Server no MTOM => MTOM Request, XML Response
Client MTOM = Server MTOM => MTOM Request, MTOM Response
Client no MTOM = Server MTOM => XML Request, XML Response
But in the last case I am always getting an MTOM respnose.

Is there a way to make this work?
It's important that the client without MTOM do nothing clever at all (in 
production it'll have clients using the old Microsoft SOAP Toolkit from 
ASP (not .Net).



View raw message