// Use the interface contract of the reference on the component type
Reference componentTypeRef = reference.getReference();
InterfaceContract sourceContract =
componentTypeRef == null ? reference.getInterfaceContract() : componentTypeRef.getInterfaceContract();
sourceContract = sourceContract.makeUnidirectional(false);
EndpointReference epr = new EndpointReferenceImpl(component, reference, binding, sourceContract);
ReferenceParameters parameters = getReferenceParameters();
epr.setReferenceParameters(parameters);
return epr;
}