Search in sources :

Example 1 with SoapTransportFactory

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);
}
Also used : SoapBindingFactory(org.apache.cxf.binding.soap.SoapBindingFactory) DestinationFactoryManager(org.apache.cxf.transport.DestinationFactoryManager) LocalTransportFactory(org.apache.cxf.transport.local.LocalTransportFactory) ConduitInitiatorManager(org.apache.cxf.transport.ConduitInitiatorManager) WSDLManagerImpl(org.apache.cxf.wsdl11.WSDLManagerImpl) BindingFactoryManager(org.apache.cxf.binding.BindingFactoryManager) SoapTransportFactory(org.apache.cxf.binding.soap.SoapTransportFactory) Before(org.junit.Before)

Example 2 with SoapTransportFactory

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);
}
Also used : SoapBindingFactory(org.apache.cxf.binding.soap.SoapBindingFactory) DestinationFactoryManager(org.apache.cxf.transport.DestinationFactoryManager) LocalTransportFactory(org.apache.cxf.transport.local.LocalTransportFactory) ConduitInitiatorManager(org.apache.cxf.transport.ConduitInitiatorManager) BindingFactoryManager(org.apache.cxf.binding.BindingFactoryManager) SoapTransportFactory(org.apache.cxf.binding.soap.SoapTransportFactory) Before(org.junit.Before)

Example 3 with SoapTransportFactory

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);
}
Also used : Bus(org.apache.cxf.Bus) SoapBindingFactory(org.apache.cxf.binding.soap.SoapBindingFactory) DestinationFactoryManager(org.apache.cxf.transport.DestinationFactoryManager) LocalTransportFactory(org.apache.cxf.transport.local.LocalTransportFactory) BindingFactoryManager(org.apache.cxf.binding.BindingFactoryManager) SoapTransportFactory(org.apache.cxf.binding.soap.SoapTransportFactory)

Example 4 with SoapTransportFactory

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());
    }
}
Also used : JaxWsServiceReference(org.apache.openejb.core.ivm.naming.JaxWsServiceReference) WebServiceInjectionConfigurator(org.apache.openejb.server.cxf.client.WebServiceInjectionConfigurator) SoapTransportFactory(org.apache.cxf.binding.soap.SoapTransportFactory)

Example 5 with SoapTransportFactory

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);
            }
        }
    };
}
Also used : ProtocolServer(org.apache.dubbo.rpc.ProtocolServer) RemotingServer(org.apache.dubbo.remoting.RemotingServer) ServerFactoryBean(org.apache.cxf.frontend.ServerFactoryBean) SoapTransportFactory(org.apache.cxf.binding.soap.SoapTransportFactory) DestinationRegistryImpl(org.apache.cxf.transport.http.DestinationRegistryImpl)

Aggregations

SoapTransportFactory (org.apache.cxf.binding.soap.SoapTransportFactory)6 BindingFactoryManager (org.apache.cxf.binding.BindingFactoryManager)4 SoapBindingFactory (org.apache.cxf.binding.soap.SoapBindingFactory)4 DestinationFactoryManager (org.apache.cxf.transport.DestinationFactoryManager)4 LocalTransportFactory (org.apache.cxf.transport.local.LocalTransportFactory)4 ConduitInitiatorManager (org.apache.cxf.transport.ConduitInitiatorManager)3 Before (org.junit.Before)3 Bus (org.apache.cxf.Bus)2 ServerFactoryBean (org.apache.cxf.frontend.ServerFactoryBean)1 DestinationRegistryImpl (org.apache.cxf.transport.http.DestinationRegistryImpl)1 WSDLManagerImpl (org.apache.cxf.wsdl11.WSDLManagerImpl)1 RemotingServer (org.apache.dubbo.remoting.RemotingServer)1 ProtocolServer (org.apache.dubbo.rpc.ProtocolServer)1 JaxWsServiceReference (org.apache.openejb.core.ivm.naming.JaxWsServiceReference)1 WebServiceInjectionConfigurator (org.apache.openejb.server.cxf.client.WebServiceInjectionConfigurator)1