}
return wire;
}
public void createWires(Service service, String targetName, ServiceContract<?> contract) {
InboundWire inboundWire = new InboundWireImpl();
// [rfeng] Check if the Reference has the binding contract
ServiceContract<?> bindingContract = service.getBindingServiceContract();
if (bindingContract == null) {
bindingContract = contract;
}
inboundWire.setServiceContract(bindingContract);
inboundWire.setContainer(service);
for (Operation<?> operation : bindingContract.getOperations().values()) {
InboundInvocationChain inboundChain = createInboundChain(operation);
inboundWire.addInvocationChain(operation, inboundChain);
}
OutboundWire outboundWire = new OutboundWireImpl();
outboundWire.setServiceContract(contract);
outboundWire.setTargetName(new QualifiedName(targetName));