protected EndpointInfo createEndpointInfo() throws BusException {
if (transportId == null
&& getAddress() != null) {
DestinationFactory df = getDestinationFactory();
if (df == null) {
DestinationFactoryManager dfm = getBus().getExtension(DestinationFactoryManager.class);
df = dfm.getDestinationFactoryForUri(getAddress());
}
if (df != null) {
transportId = df.getTransportIds().get(0);
} else {
//check conduits (the address could be supported on client only)
ConduitInitiatorManager cim = getBus().getExtension(ConduitInitiatorManager.class);
ConduitInitiator ci = cim.getConduitInitiatorForUri(getAddress());
if (ci != null) {
transportId = ci.getTransportIds().get(0);
}
}
}
// Get the Service from the ServiceFactory if specified
Service service = serviceFactory.getService();
// SOAP nonsense
BindingInfo bindingInfo = createBindingInfo();
if (bindingInfo instanceof SoapBindingInfo
&& (((SoapBindingInfo) bindingInfo).getTransportURI() == null
|| LocalTransportFactory.TRANSPORT_ID.equals(transportId))) {
((SoapBindingInfo) bindingInfo).setTransportURI(transportId);
transportId = "http://schemas.xmlsoap.org/wsdl/soap/";
}
if (transportId == null) {
if (bindingInfo instanceof SoapBindingInfo) {
// TODO: we shouldn't have to do this, but the DF is null because the
// LocalTransport doesn't return for the http:// uris
// People also seem to be supplying a null JMS getAddress(), which is worrying
transportId = "http://schemas.xmlsoap.org/wsdl/soap/";
} else {
transportId = "http://schemas.xmlsoap.org/wsdl/http/";
}
}
service.getServiceInfos().get(0).addBinding(bindingInfo);
setTransportId(transportId);
if (destinationFactory == null) {
DestinationFactoryManager dfm = getBus().getExtension(DestinationFactoryManager.class);
destinationFactory = dfm.getDestinationFactory(transportId);
}
EndpointInfo ei;
if (destinationFactory instanceof WSDLEndpointFactory) {
ei = ((WSDLEndpointFactory)destinationFactory)