JBoss.org Community Documentation

5.7.1. The MTOM enabled SOAP 1.1 binding ID

MTOM enabled clients

Web service clients can use the same approach described above or rely on the Binding API to enable MTOM (Excerpt taken from the org.jboss.test.ws.jaxws.samples.xop.doclit.XOPTestCase):

[...] 
	Service service = Service.create(wsdlURL, serviceName); 
	port = service.getPort(MTOMEndpoint.class); 
	
	// enable MTOM 
	binding = (SOAPBinding)((BindingProvider)port).getBinding(); 
	binding.setMTOMEnabled(true);