As it stands, it is not possible to invoke and then later receive a response from an asynchronous external SOAP service within a single BPEL process, whether WS-Addressing is enabled or not.
Current Behaviour: The invoke activity is treated as a synchronous call, with the invoke activity timing out and failing the process after 12 seconds before it can even reach the receive activity. On the server side, the callback fails to happen as the ReplyTo address is set as the “anonymous” URI.
Expected: Invoke activities within BPEL scripts that do not specify an outputVariable would be treated as one-way invokes that do not expect a synchronous response. A one-way invoke is followed by a receive activity for the same service as the invoke but a different port, would be treated as an asynchronous call. In such a case, WS-Addressing headers would be sent with the invoke, providing a ReplyTo address that Switchyard will listen for a callback on (generated dynamically or via some other method). The BPEL process would wait indefinitely for this response, with the callback being routed to the waiting BPEL process whenever it arrives.
Attached is a simple project containing a simple synchronous BPEL process that invokes the asynchronous web service implemented by the “services\AsyncProcessService.wsdl” file. It will then wait for an asynchronous response before replying itself. The process will currently error after 12s as it expects a synchronous response in that time and the service implementing the WSDL will fail to callback due to the “anonymous” URI being sent as the ReplyTo address.
|