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.
In Gateway mode, the SOAP.Context.operationType field is set to GATEWAY if the Operation is determined to be request-response, or GATEWAY_ONE_WAY if the Operation is determined to be one-way. If the operation is determined to be one-way, no reply is necessary or allowed. However, if the Operation is not determined to be one-way, the flow is configured with the assumption that the flow sends a reply. Therefore, if the Operation is one-way, you must specify that the Operation is one-way in order to allow the flow to free up resources, and, if HTTP is being used, to send an HTTP 202 acknowledgment back to the originating client. Do this by setting the following field in the local environment before wiring the message to a SOAPReply node:
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:

Facade Flow

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

In Gateway mode, the SOAPRequest node automatically detects whether a message is one-way only if WSA is used and the WSA:ReplyTo and WSA:FaultTo addresses are set to the special WSA:None address. To manually instruct the node that the message is one-way, set the following option in the local environment:
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.