List<Endpoint> endpoints = endpointRegistry.findEndpoint(endpointReference);
// TODO - do we exepect to find more than one endpoint in
// anything other than the autowire case?
if (endpoints.size() == 0) {
throw new SCARuntimeException("No endpoints found for EndpointReference " + endpointReference.toString());
}
if (endpoints.size() > 1) {
throw new SCARuntimeException("More than one endpoint found for EndpointReference" + endpointReference.toString());
}
endpointReference.setTargetEndpoint(endpoints.get(0));
matchForwardBinding(endpointReference, false, monitor);
matchCallbackBinding(endpointReference, monitor);
}
}
if (endpointReference.isUnresolved()){
throw new SCARuntimeException("Can't resolve " + endpointReference.toString());
}
}