Java Code Examples for org.apache.cxf.transport.DestinationFactoryManager#registerDestinationFactory()
The following examples show how to use
org.apache.cxf.transport.DestinationFactoryManager#registerDestinationFactory() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ConfiguredEndpointTest.java From cxf with Apache License 2.0 | 6 votes |
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); }
Example 2
Source File: AbstractAegisTest.java From cxf with Apache License 2.0 | 5 votes |
@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); }
Example 3
Source File: AbstractJaxWsTest.java From cxf with Apache License 2.0 | 5 votes |
@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); }
Example 4
Source File: AbstractSimpleFrontendTest.java From cxf with Apache License 2.0 | 5 votes |
@Before public void setUp() throws Exception { super.setUpBus(); Bus bus = getBus(); SoapBindingFactory bindingFactory = new SoapBindingFactory(); bus.getExtension(BindingFactoryManager.class) .registerBindingFactory("http://schemas.xmlsoap.org/wsdl/soap/", bindingFactory); DestinationFactoryManager dfm = bus.getExtension(DestinationFactoryManager.class); SoapTransportFactory soapTF = new SoapTransportFactory(); dfm.registerDestinationFactory("http://schemas.xmlsoap.org/wsdl/soap/", soapTF); dfm.registerDestinationFactory("http://schemas.xmlsoap.org/soap/", soapTF); LocalTransportFactory localTransport = new LocalTransportFactory(); localTransport.getUriPrefixes().add("http"); dfm.registerDestinationFactory("http://schemas.xmlsoap.org/wsdl/soap/http", localTransport); dfm.registerDestinationFactory("http://schemas.xmlsoap.org/soap/http", localTransport); ConduitInitiatorManager extension = bus.getExtension(ConduitInitiatorManager.class); extension.registerConduitInitiator(LocalTransportFactory.TRANSPORT_ID, localTransport); extension.registerConduitInitiator("http://schemas.xmlsoap.org/wsdl/soap/http", localTransport); extension.registerConduitInitiator("http://schemas.xmlsoap.org/soap/http", localTransport); extension.registerConduitInitiator("http://schemas.xmlsoap.org/wsdl/soap/", soapTF); }