use of org.apache.cxf.binding.soap.model.SoapBindingInfo in project cxf by apache.
the class SoapTransportFactory method getConduit.
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));
}
}
use of org.apache.cxf.binding.soap.model.SoapBindingInfo in project cxf by apache.
the class SoapTransportFactory method createEndpointInfo.
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;
}
use of org.apache.cxf.binding.soap.model.SoapBindingInfo in project cxf by apache.
the class SoapTransportFactory method createPortExtensors.
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);
}
}
Aggregations