If you publish your service using XML, such as when deploying to a container, you can enable your endpoint's MTOM support in the endpoint's configuration file. For more information on configuring endpoint's see Configuring Web Service Endpoints.
The MTOM property is set inside the jaxws:endpoint element for your endpoint. To enable
MTOM do the following:
Add a
jaxws:propertychild element to the endpoint'sjaxws:endpointelement.Add a
entrychild element to thejaxws:propertyelement.Set the
entryelement'skeyattribute tomtom-enabled.Set the
entryelement'svalueattribute totrue.
Example 20 shows an endpoint that is MTOM enabled.
Example 20. Configuration for Enabling MTOM
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxws="http://cxf.apache.org/jaxws" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schema/jaxws.xsd"> <jaxws:endpoint id="xRayStorage" implementor="demo.spring.xRayStorImpl" address="http://localhost/xRayStorage"> <jaxws:properties> <entry key="mtom-enabled" value="true"/> </jaxws:properties> </jaxws:endpoint> </beans>








