One-way messages in Gateway mode
When you configure a SOAP node using WSDL, the WSDL specifies whether a given node operation is one-way or not. However, configuring a node in Gateway mode without WSDL means that this WSDL information is not available. Therefore, SOAP nodes configured as Gateways automatically attempt to detect one-way Operations based on the message content.
SOAPInput node one-way Operation detection
The SOAPInput node detects one-way messages in different ways depending on the transport used, and whether or not WS-Addressing is configured on the node.
- If the node uses HTTP transport and has WS-Addressing configured, the operation is determined to be one-way if the inbound message uses the special WSA:None address for the WSA:ReplyTo and WSA:FaultTo addresses.
- If the node uses HTTP transport and does not have WS-Addressing configured, no auto detection of one-way messages takes place.
- If the node uses JMS transport and has WS-Addressing configured,
the operation is determined to be one-way if either of the following
conditions are true:
- The inbound message uses the special WSA:None address (http://www.w3.org/2005/08/addressing/none) for the WSA:ReplyTo and WSA:FaultTo addresses.
- There is no JMS ReplyTo destination specified in the inbound message, and the inbound message uses the special WSA:Anonymous address (http://www.w3.org/2005/08/addressing/anonymous or http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous) for the WSA:ReplyTo and WSA:FaultTo addresses.
- If the node uses JMS transport and does not have WS-Addressing configured, the operation is determined to be one-way if there is no JMS ReplyTo destination specified in the inbound message.
SET OutputLocalEnvironment.Destination.SOAP.Reply.Gateway.OneWay = 'true';
This setting instructs the SOAPReply node to complete the Message Exchange Pattern before sending an HTTP 202 acknowledgment, if required, and freeing up its resources.
One approach for using this setting would be in a Gateway flow like this:
In this flow, the Compute node determines if the message is one-way. If the message is one-way, the Compute node sets the local environment one-way setting, and sends a message to the SOAPReply node to complete the Message Exchange Pattern. If the flow is a Gateway flow and the one-way local environment option is set, any message received by the SOAPReply node causes it to ignore the message content and complete the Message Exchange Pattern. The flow can then continue through the other terminal of the Compute node.
It is not an error to send a message to the SOAPReply node with the one-way local environment option set if the message has been automatically determined to be a one-way message.
SOAPRequest node one-way Operation detection
SET OutputLocalEnvironment.Destination.SOAP.Request.Gateway.OneWay = 'true';
For the SOAPRequest node, specifying that a message is one-way indicates to the node that a response is not expected, except for an HTTP 202 acknowledgment if HTTP transport is used. If JMS transport is used, it also allows the message to be sent under the control of any existing transaction, if the Transaction mode is to Yes or Automatic.