}
private Topology lookupEndpointInUDDI(String serviceKey) throws RemoteException, ConfigurationException, TransportException {
Topology topology = null;
BusinessService service = clerk.getServiceDetail(serviceKey);
if (service==null) {
log.warn("No Service with key " + serviceKey + " was found in the registry.");
//TODO find service by tModel
}
if (service!=null && service.getBindingTemplates()!=null && service.getBindingTemplates().getBindingTemplate() != null) {
ArrayList<String> eprs = new ArrayList<String>();
BindingTemplates bindingTemplates = service.getBindingTemplates();
if (bindingTemplates==null) {
log.warn("Found service " + service.getName().get(0).getValue()
+ " with serviceKey '" + serviceKey + "'"
+ " but no EPRs");
} else {
log.debug("Found service " + service.getName().get(0).getValue()
+ " with serviceKey '" + serviceKey + "'"
+ " and " + bindingTemplates.getBindingTemplate().size() + " EPRs");
//Loop over all bindingTemplates found and get the endpoints.
for (BindingTemplate bindingTemplate : bindingTemplates.getBindingTemplate()) {
AccessPoint accessPoint = bindingTemplate.getAccessPoint();