transId = ((SoapBindingInfo)bi).getTransportURI();
if (transId == null) {
transId = ei.getTransportId();
}
}
DestinationFactory destinationFactory;
try {
DestinationFactoryManager mgr = bus.getExtension(DestinationFactoryManager.class);
if (StringUtils.isEmpty(address)
|| address.startsWith("http")
|| address.startsWith("jms")
|| address.startsWith("/")) {
destinationFactory = mgr.getDestinationFactory(mapTransportURI(transId, address));
} else {
destinationFactory = mgr.getDestinationFactoryForUri(address);
}
return destinationFactory.getDestination(ei);
} catch (BusException e) {
IOException ex = new IOException("Could not find destination factory for transport " + transId);
ex.initCause(e);
throw ex;
}