/** * Get the Runtime Wire for the supplied reference * @param componentReference - the reference * @return - the RuntimeWire - null if it cannot be found */ private RuntimeEndpointReference getEndpointReference( RuntimeComponentReference componentReference, PartnerRoleMessageExchange mex) { if( componentReference.isForCallback() ) { // Where there is a callback, it is necessary to create a specialized wire, based on callback information // present on the forward call // Get the callbackEPR for the callback using the BPEL Process ID and the Reference name // - which is the same name as the service name for a callback Long processID = _server.getProcessIDFromMex(mex.getMessageExchangeId()); org.apache.tuscany.sca.assembly.EndpointReference callbackEPR = _server.getCallbackMetadata(processID, componentReference.getName()); RuntimeEndpointReference wire = selectCallbackWire( callbackEPR.getTargetEndpoint(), componentReference ); wire = clone_bind( componentReference, callbackEPR.getCallbackEndpoint() ); return wire; } else { // No callback case... //TODO - fix the x..n multiplicity case, which needs to select the correct ONE of multiple // EndpointReferences here return (RuntimeEndpointReference) componentReference.getEndpointReferences().get(0); } // end if } // end method getEndpointReference
resolvedEndpoint = msgContext.getFrom().getCallbackEndpoint();
msg.setTo(callbackEndpoint); } else { callbackEndpoint = msg.getFrom().getCallbackEndpoint();
protected void setHeaders(SOAPHeader sh, Message msg, String action) throws SOAPException { Endpoint callbackEndpoint = msg.getFrom().getCallbackEndpoint();
if (tuscanyMsg.getFrom().getCallbackEndpoint() != null) {
(endpointReference.getCallbackEndpoint() == null || endpointReference.getCallbackEndpoint().isUnresolved())) { selectCallbackEndpoint(endpointReference, endpointReference.getReference().getCallbackService(), !((EndpointReferenceAsyncProvider)referenceBindingProvider).supportsNativeAsync() && endpointReference.isAsyncInvocation() && endpointReference.getCallbackEndpoint() == null) { ((RuntimeEndpointReference)endpointReference).createAsyncCallbackEndpoint();