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();
if (AccessPointType.END_POINT.toString().equals(accessPoint.getUseType())) {
String url = accessPoint.getValue();
log.debug("epr= " + url);
eprs.add(url);