// Add a wire for each service Endpoint
for ( Endpoint endpoint : runtimeService.getEndpoints()){
// fluff up a fake endpoint reference as we are on the service side
// so we need to represent the reference that will call us
EndpointReference endpointReference = assemblyFactory.createEndpointReference();
endpointReference.setBinding(endpoint.getBinding());
endpointReference.setTargetEndpoint(endpoint);
// create the interface contract for the binding and service ends of the wire
// that are created as forward only contracts
// FIXME: [rfeng] We might need a better way to get the impl interface contract
Service targetService = service.getService();
if (targetService == null) {
targetService = service;
}
endpoint.setInterfaceContract(targetService.getInterfaceContract().makeUnidirectional(false));
endpointReference.setInterfaceContract(getServiceBindingInterfaceContract(service, endpoint.getBinding()));
// create the wire
RuntimeWire wire = new RuntimeWireImpl(extensionPoints,
false,
endpointReference,