reference.getEndpointReferences().add(endpointReference);
endpointReference.setBinding(binding);
// set up the EPR so that resolution will happen
// at wire creation time if needs be
Endpoint endpoint = assemblyFactory.createEndpoint();
endpointReference.setTargetEndpoint(endpoint);
if (reference.getTargets().size() > 0){
// create a dummy endpoint with the URI set so that
// the endpoint registry will be consulted
endpoint.setUnresolved(true);
endpoint.setURI(reference.getTargets().get(0).getName());
endpointReference.setStatus(EndpointReference.Status.WIRED_TARGET_NOT_FOUND);
endpointReference.setUnresolved(true);
} else {
endpoint.setUnresolved(false);
endpoint.setBinding(reference.getBindings().get(0));
endpointReference.setStatus(EndpointReference.Status.RESOLVED_BINDING);
endpointReference.setUnresolved(false);
}
}
return endpointReference;