Choosing asynchronous behavior for the SOAPAsyncRequest node
Choose between WS-Addressing and HTTP asynchronous request-response to make asynchronous requests using the SOAPAsyncRequest node with HTTP transport.
Before you begin
Read the concept information about Using HTTP asynchronous request-response.
About this task
The SOAPAsyncRequest node can use HTTP or JMS transport. It is linked as a pair with a SOAPAsyncResponse node using a unique identifier to correlate response messages with the original request.
The SOAPAsyncRequest node sends a web service request, but the node does not wait for the associated web service response to be received. This asynchronous functionality enables multiple outbound requests to be made almost in parallel because the outbound request is not blocked waiting for the response. The web service response is received by the SOAPAsyncResponse node, which can be in a separate message flow.
- Using WS-Addressing to direct the response to the paired SOAPAsyncResponse node. The SOAPAsyncRequest node waits for the HTTP 202 acknowledgment before continuing with the message flow, and the SOAPAsyncRequest node blocks if the acknowledgment is not received. A new HTTP connection is made by the backend server to reply to the SOAPAsyncResponse node. This is the default behavior.
- Using HTTP asynchronous request-response. When the SOAPAsyncRequest property Use HTTP asynchronous request-response is selected, the SOAPAsyncRequest node passes the HTTP socket to the paired SOAPAsyncResponse node to allow the backend server to reply using the same socket. When this option is selected, WS-Addressing headers are sent, but are not required to be understood by the backend server. The WS-Addressing headers are not marked as mustUnderstand, and the replyTo header is set to anonymous. The node therefore uses asynchronous HTTP socket handling instead of WS-Addressing to make HTTP requests and receive an asynchronous response.
Typically you should choose the HTTP asynchronous request-response method to make asynchronous requests using the SOAPAsyncRequest node with HTTP transport. To use this behavior, ensure that the SOAPAsyncRequest node property Use HTTP asynchronous request-response is selected.
- If you want to use WS-Addressing to explicitly set the replyTo header for the response message
- If the backend server has a high latency, you might want to use WS-Addressing instead of HTTP asynchronous request-response so that the HTTP socket is not left open for a long time.