use of org.apache.cxf.binding.soap.SoapTransportFactory in project cxf by apache.
the class AbstractAegisTest method setUp.
@Before
public void setUp() throws Exception {
super.setUpBus();
SoapBindingFactory bindingFactory = new SoapBindingFactory();
bindingFactory.setBus(bus);
bus.getExtension(BindingFactoryManager.class).registerBindingFactory("http://schemas.xmlsoap.org/wsdl/soap/", bindingFactory);
DestinationFactoryManager dfm = bus.getExtension(DestinationFactoryManager.class);
SoapTransportFactory soapDF = new SoapTransportFactory();
dfm.registerDestinationFactory("http://schemas.xmlsoap.org/wsdl/soap/", soapDF);
dfm.registerDestinationFactory(SoapBindingConstants.SOAP11_BINDING_ID, soapDF);
dfm.registerDestinationFactory("http://cxf.apache.org/transports/local", soapDF);
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);
ConduitInitiatorManager extension = bus.getExtension(ConduitInitiatorManager.class);
extension.registerConduitInitiator(LocalTransportFactory.TRANSPORT_ID, localTransport);
extension.registerConduitInitiator("http://schemas.xmlsoap.org/wsdl/soap/", localTransport);
extension.registerConduitInitiator("http://schemas.xmlsoap.org/soap/http", localTransport);
extension.registerConduitInitiator(SoapBindingConstants.SOAP11_BINDING_ID, localTransport);
bus.setExtension(new WSDLManagerImpl(), WSDLManager.class);
// WoodstoxValidationImpl wstxVal = new WoodstoxValidationImpl();
addNamespace("wsdl", WSDLConstants.NS_WSDL11);
addNamespace("wsdlsoap", WSDLConstants.NS_SOAP11);
addNamespace("xsd", WSDLConstants.NS_SCHEMA_XSD);
}
use of org.apache.cxf.binding.soap.SoapTransportFactory in project cxf by apache.
the class AbstractJaxWsTest method setUpBus.
@Before
public void setUpBus() throws Exception {
super.setUpBus();
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 soapDF = new SoapTransportFactory();
dfm.registerDestinationFactory("http://schemas.xmlsoap.org/wsdl/soap/", soapDF);
dfm.registerDestinationFactory(SoapBindingConstants.SOAP11_BINDING_ID, soapDF);
dfm.registerDestinationFactory(SoapBindingConstants.SOAP12_BINDING_ID, soapDF);
dfm.registerDestinationFactory("http://cxf.apache.org/transports/local", soapDF);
localTransport = new LocalTransportFactory();
localTransport.setUriPrefixes(new HashSet<>(Arrays.asList("http", "local")));
dfm.registerDestinationFactory(LocalTransportFactory.TRANSPORT_ID, localTransport);
dfm.registerDestinationFactory("http://cxf.apache.org/transports/http", localTransport);
dfm.registerDestinationFactory("http://cxf.apache.org/transports/http/configuration", localTransport);
ConduitInitiatorManager extension = bus.getExtension(ConduitInitiatorManager.class);
extension.registerConduitInitiator(LocalTransportFactory.TRANSPORT_ID, localTransport);
extension.registerConduitInitiator("http://schemas.xmlsoap.org/soap/http", localTransport);
extension.registerConduitInitiator("http://cxf.apache.org/transports/http", localTransport);
extension.registerConduitInitiator("http://cxf.apache.org/transports/http/configuration", localTransport);
}
use of org.apache.cxf.binding.soap.SoapTransportFactory in project cxf by apache.
the class ConfiguredEndpointTest method initializeBus.
private void initializeBus() {
Bus bus = BusFactory.getDefaultBus();
SoapBindingFactory bindingFactory = new SoapBindingFactory();
bus.getExtension(BindingFactoryManager.class).registerBindingFactory("http://schemas.xmlsoap.org/wsdl/soap/", bindingFactory);
DestinationFactoryManager dfm = bus.getExtension(DestinationFactoryManager.class);
SoapTransportFactory soapDF = new SoapTransportFactory();
dfm.registerDestinationFactory("http://schemas.xmlsoap.org/wsdl/soap/", soapDF);
dfm.registerDestinationFactory("http://schemas.xmlsoap.org/soap/", soapDF);
LocalTransportFactory localTransport = new LocalTransportFactory();
dfm.registerDestinationFactory("http://schemas.xmlsoap.org/soap/http", localTransport);
dfm.registerDestinationFactory("http://schemas.xmlsoap.org/wsdl/soap/http", localTransport);
}
use of org.apache.cxf.binding.soap.SoapTransportFactory in project tomee by apache.
the class CxfService method init.
@Override
public void init(final Properties props) throws java.lang.Exception {
super.init(props);
CxfUtil.configureBus();
SaajInterceptor.registerInterceptors();
factoryByListener = "true".equalsIgnoreCase(props.getProperty("openejb.cxf.factoryByListener", "false"));
transportFactory = new SoapTransportFactory();
if (SystemInstance.get().getComponent(JaxWsServiceReference.WebServiceClientCustomizer.class) == null) {
SystemInstance.get().setComponent(JaxWsServiceReference.WebServiceClientCustomizer.class, new WebServiceInjectionConfigurator());
}
}
use of org.apache.cxf.binding.soap.SoapTransportFactory in project dubbo by alibaba.
the class WebServiceProtocol method doExport.
@Override
protected <T> Runnable doExport(T impl, Class<T> type, URL url) throws RpcException {
transportFactory = new SoapTransportFactory();
destinationRegistry = new DestinationRegistryImpl();
String addr = getAddr(url);
ProtocolServer protocolServer = serverMap.get(addr);
if (protocolServer == null) {
RemotingServer remotingServer = httpBinder.bind(url, new WebServiceHandler());
serverMap.put(addr, new ProxyProtocolServer(remotingServer));
}
serverFactoryBean = new ServerFactoryBean();
serverFactoryBean.setAddress(url.getAbsolutePath());
serverFactoryBean.setServiceClass(type);
serverFactoryBean.setServiceBean(impl);
serverFactoryBean.setBus(bus);
serverFactoryBean.setDestinationFactory(transportFactory);
serverFactoryBean.getServiceFactory().getConfigurations().add(new URLHashMethodNameSoapActionServiceConfiguration());
server = serverFactoryBean.create();
return new Runnable() {
@Override
public void run() {
if (serverFactoryBean.getServer() != null) {
serverFactoryBean.getServer().destroy();
}
if (serverFactoryBean.getBus() != null) {
serverFactoryBean.getBus().shutdown(true);
}
ProtocolServer httpServer = serverMap.get(addr);
if (httpServer != null) {
httpServer.close();
serverMap.remove(addr);
}
}
};
}
Aggregations