private SoapTransportFactory newTransportFactory() { return !factoryByListener ? transportFactory : new SoapTransportFactory(); }
public Conduit getConduit(EndpointInfo ei, Bus b) throws IOException { return getConduit(ei, ei.getTarget(), b); }
/** * Add objects to the bus to set up the local transport, soap transport, soap bindings, and WSDL manager. * All you need to test databindings and other type-related operations. * @throws BusException */ public void setUp() throws BusException { 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(); soapDF.setBus(bus); dfm.registerDestinationFactory("http://schemas.xmlsoap.org/wsdl/soap/", soapDF); dfm.registerDestinationFactory("http://schemas.xmlsoap.org/soap/", 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("http://schemas.xmlsoap.org/soap/", localTransport); bus.setExtension(new WSDLManagerImpl(), WSDLManager.class); addNamespace("wsdl", SOAPConstants.WSDL11_NS); addNamespace("wsdlsoap", SOAPConstants.WSDL11_SOAP_NS); addNamespace("xsd", SOAPConstants.XSD); }
|| address.startsWith("soap.udp") || address.startsWith("/")) { destinationFactory = mgr.getDestinationFactory(mapTransportURI(transId, address)); } else { destinationFactory = mgr.getDestinationFactoryForUri(address);
public void createPortExtensors(Bus b, EndpointInfo ei, Service service) { if (ei.getBinding() instanceof SoapBindingInfo) { SoapBindingInfo bi = (SoapBindingInfo)ei.getBinding(); createSoapExtensors(b, ei, bi, bi.getSoapVersion() instanceof Soap12); } }
public EndpointInfo createEndpointInfo(Bus bus, ServiceInfo serviceInfo, BindingInfo b, List<?> ees) { String transportURI = "http://schemas.xmlsoap.org/wsdl/soap/"; if (b instanceof SoapBindingInfo) { SoapBindingInfo sbi = (SoapBindingInfo)b; transportURI = sbi.getTransportURI(); } EndpointInfo info = new SoapEndpointInfo(serviceInfo, transportURI); if (ees != null) { for (Iterator<?> itr = ees.iterator(); itr.hasNext();) { Object extensor = itr.next(); if (SOAPBindingUtil.isSOAPAddress(extensor)) { final SoapAddress sa = SOAPBindingUtil.getSoapAddress(extensor); info.addExtensor(sa); info.setAddress(sa.getLocationURI()); if (isJMSSpecAddress(sa.getLocationURI())) { info.setTransportId(SoapJMSConstants.SOAP_JMS_SPECIFICIATION_TRANSPORTID); } } else { info.addExtensor(extensor); } } } return info; }
|| address.startsWith("soap.udp") || address.startsWith("/")) { destinationFactory = mgr.getDestinationFactory(mapTransportURI(transId, address)); } else { destinationFactory = mgr.getDestinationFactoryForUri(address);
public void createPortExtensors(Bus b, EndpointInfo ei, Service service) { if (ei.getBinding() instanceof SoapBindingInfo) { SoapBindingInfo bi = (SoapBindingInfo)ei.getBinding(); createSoapExtensors(b, ei, bi, bi.getSoapVersion() instanceof Soap12); } }
public EndpointInfo createEndpointInfo(Bus bus, ServiceInfo serviceInfo, BindingInfo b, List<?> ees) { String transportURI = "http://schemas.xmlsoap.org/wsdl/soap/"; if (b instanceof SoapBindingInfo) { SoapBindingInfo sbi = (SoapBindingInfo)b; transportURI = sbi.getTransportURI(); } EndpointInfo info = new SoapEndpointInfo(serviceInfo, transportURI); if (ees != null) { for (Iterator<?> itr = ees.iterator(); itr.hasNext();) { Object extensor = itr.next(); if (SOAPBindingUtil.isSOAPAddress(extensor)) { final SoapAddress sa = SOAPBindingUtil.getSoapAddress(extensor); info.addExtensor(sa); info.setAddress(sa.getLocationURI()); if (isJMSSpecAddress(sa.getLocationURI())) { info.setTransportId(SoapJMSConstants.SOAP_JMS_SPECIFICIATION_TRANSPORTID); } } else { info.addExtensor(extensor); } } } return info; }
@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()); } }
public Conduit getConduit(EndpointInfo ei, EndpointReferenceType target, Bus bus) throws IOException { String address = target == null ? ei.getAddress() : target.getAddress().getValue(); BindingInfo bi = ei.getBinding(); String transId = ei.getTransportId(); if (bi instanceof SoapBindingInfo) { transId = ((SoapBindingInfo)bi).getTransportURI(); if (transId == null) { transId = ei.getTransportId(); } } ConduitInitiator conduitInit; try { ConduitInitiatorManager mgr = bus.getExtension(ConduitInitiatorManager.class); if (StringUtils.isEmpty(address) || address.startsWith("http") || address.startsWith("jms") || address.startsWith("soap.udp")) { conduitInit = mgr.getConduitInitiator(mapTransportURI(transId, address)); } else { conduitInit = mgr.getConduitInitiatorForUri(address); } if (conduitInit == null) { throw new RuntimeException(String.format(CANNOT_GET_CONDUIT_ERROR, address, transId)); } return conduitInit.getConduit(ei, target, bus); } catch (BusException e) { throw new RuntimeException(String.format(CANNOT_GET_CONDUIT_ERROR, address, transId)); } }
public Conduit getConduit(EndpointInfo ei, Bus b) throws IOException { return getConduit(ei, ei.getTarget(), b); }
public Conduit getConduit(EndpointInfo ei, EndpointReferenceType target, Bus bus) throws IOException { String address = target == null ? ei.getAddress() : target.getAddress().getValue(); BindingInfo bi = ei.getBinding(); String transId = ei.getTransportId(); if (bi instanceof SoapBindingInfo) { transId = ((SoapBindingInfo)bi).getTransportURI(); if (transId == null) { transId = ei.getTransportId(); } } ConduitInitiator conduitInit; try { ConduitInitiatorManager mgr = bus.getExtension(ConduitInitiatorManager.class); if (StringUtils.isEmpty(address) || address.startsWith("http") || address.startsWith("jms") || address.startsWith("soap.udp")) { conduitInit = mgr.getConduitInitiator(mapTransportURI(transId, address)); } else { conduitInit = mgr.getConduitInitiatorForUri(address); } if (conduitInit == null) { throw new RuntimeException(String.format(CANNOT_GET_CONDUIT_ERROR, address, transId)); } return conduitInit.getConduit(ei, target, bus); } catch (BusException e) { throw new RuntimeException(String.format(CANNOT_GET_CONDUIT_ERROR, address, transId)); } }