CxfConfiguration clientConfig = new CxfConfiguration();
clientConfig.setMuleContext(muleContext);
clientConfig.initialise();
BusFactory.setThreadDefaultBus(clientConfig.getCxfBus());
TestMtomService svc = new TestMtomService(wsdl);
TestMtom port = svc.getTestMtomPort();
BindingProvider bp = ((BindingProvider) port);
bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
"http://localhost:" + dynamicPort.getNumber() + "/services/mtom");
((SOAPBinding) bp.getBinding()).setMTOMEnabled(true);