String[] transports = new String[]{
"http://cxf.apache.org/transports/local",
"http://schemas.xmlsoap.org/soap/http",
"http://schemas.xmlsoap.org/wsdl/soap/http"
};
LocalTransportFactory local = new LocalTransportFactory();
local.setTransportIds(Arrays.asList(transports));
Bus bus = BusFactory.newInstance().createBus();
SoapBindingFactory bindingFactory = new SoapBindingFactory();
bindingFactory.setBus(bus);
bus.getExtension(BindingFactoryManager.class).registerBindingFactory("http://schemas.xmlsoap.org/wsdl/soap/", bindingFactory);
bus.getExtension(BindingFactoryManager.class).registerBindingFactory("http://schemas.xmlsoap.org/wsdl/soap/http", bindingFactory);
DestinationFactoryManager dfm = bus.getExtension(DestinationFactoryManager.class);
SoapTransportFactory soap = new SoapTransportFactory();
soap.setBus(bus);
dfm.registerDestinationFactory("http://schemas.xmlsoap.org/wsdl/soap/", soap);
dfm.registerDestinationFactory("http://schemas.xmlsoap.org/soap/", soap);
dfm.registerDestinationFactory("http://cxf.apache.org/transports/local", soap);
LocalTransportFactory localTransport = new LocalTransportFactory();
dfm.registerDestinationFactory("http://schemas.xmlsoap.org/soap/http", localTransport);
dfm.registerDestinationFactory("http://schemas.xmlsoap.org/wsdl/soap/http", localTransport);
dfm.registerDestinationFactory("http://cxf.apache.org/bindings/xformat", localTransport);
dfm.registerDestinationFactory("http://cxf.apache.org/transports/local", localTransport);