Example use of WS-Addressing information in the local environment
This example shows the setting of reference parameters in the local environment along with the corresponding messages as they appear on the wire.
In this example the web service exposes a simple ping operation.
ESQL to add reference parameters
The following ESQL example shows how to specify addressing headers in the local environment.
DECLARE Example_ns NAMESPACE 'http://ibm.namespace';
SET OutputLocalEnvironment.Destination.SOAP.Request.WSA.ReplyTo.ReferenceParameters.Parameter1 = 'Integration node';
SET OutputLocalEnvironment.Destination.SOAP.Request.WSA.ReplyTo.ReferenceParameters.Example_ns:Parameter2.
(SOAP.NamespaceDecl)xmlns:Example_ns = 'http://ibm.namespace';
SET OutputLocalEnvironment.Destination.SOAP.Request.WSA.ReplyTo.ReferenceParameters.Example_ns:Parameter2 = 'Ping';
SET OutputLocalEnvironment.Destination.SOAP.Request.WSA.FaultTo.ReferenceParameters.Parameter1 = 'Ping';
SET OutputLocalEnvironment.Destination.SOAP.Request.WSA.FaultTo.ReferenceParameters.Example_ns:Parameter2.
(SOAP.NamespaceDecl)xmlns:Example_ns = 'http://ibm.namespace';
SET OutputLocalEnvironment.Destination.SOAP.Request.WSA.FaultTo.ReferenceParameters.gns:Parameter2 = 'FAULT';
Request message
The following example is
of an outgoing SOAP envelope in a message from a SOAPRequest node with ReplyTo
and FaultTo
reference
parameters generated after using the above ESQL. It also shows the
other message addressing properties (MAPs) that are not set in the
local environment, but are generated automatically by the node as
a result of engaging WS-Addressing.
<NS1:Envelope xmlns:NS1="http://www.w3.org/2003/05/soap-envelope" xmlns:wsa="http://www.w3.org/2005/08/addressing">
<NS1:Header>
<wsa:To>http://localhost:7801/Service</wsa:To>
<wsa:ReplyTo>
<wsa:Address>http://www.w3.org/2005/08/addressing/anonymous</wsa:Address>
<wsa:ReferenceParameters>
<Example_ns:Parameter2 xmlns:Example_ns="http://ibm.namespace">Ping</Example_ns:Parameter2>
<Parameter1>Integration node</Parameter1>
</wsa:ReferenceParameters>
</wsa:ReplyTo>
<wsa:FaultTo>
<wsa:Address>http://www.w3.org/2005/08/addressing/anonymous</wsa:Address>
<wsa:ReferenceParameters>
<Example_ns:Parameter2 xmlns:Example_ns="http://ibm.namespace">FAULT</Example_ns:Parameter2>
<Parameter1>Ping</Parameter1>
</wsa:ReferenceParameters>
</wsa:FaultTo>
<wsa:MessageID>urn:uuid:020C911C16EB130A8F1204119836321</wsa:MessageID>
<wsa:Action>http://ibm.com/Service/Ping</wsa:Action>
</NS1:Header>
<NS1:Body>
<NS2:Ping xmlns:NS2="http://ibm.com"></NS2:Ping>
</NS1:Body>
</NS1:Envelope>
In the above example, reference
parameters are set for the ReplyTo
and FaultTo
endpoint
references (EPRs). If this message is sent to a SOAPInput node with WS-Addressing
engaged, these ReferenceParameters
are placed in
the local environment of the flow that contains the SOAPInput node for use by the
flow if the Place WS-Addressing Headers
into LocalEnvironment property is selected. This option changes
only what is placed in the local environment; it does not change the
contents of the response message.
Response message
The following SOAP envelope
is a response to the outgoing preceding message, as sent by a SOAPReply node. This example
shows the MAP processing that happens automatically by the SOAPReply node. In this example,
the FaultTo
reference parameters are not present
because the reply is not a SOAP fault. This response also shows where
the reference parameters that belonged to the ReplyTo
EPR
appear in the response message.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://www.w3.org/2005/08/
addressing">
<soapenv:Header>
<wsa:To>http://www.w3.org/2005/08/addressing/anonymous</wsa:To>
<Example_ns:Parameter2 wsa:IsReferenceParameter="true" xmlns:Example_ns="http://ibm.namespace">Ping</Example_ns:
Parameter2>
<Parameter1 wsa:IsReferenceParameter="true">Integration node</Parameter1>
<wsa:ReplyTo>
<wsa:Address>http://www.w3.org/2005/08/addressing/anonymous</wsa:Address>
</wsa:ReplyTo>
<wsa:Action>http://ibm.com/Service/PingResponse</wsa:Action>
<wsa:RelatesTo RelationshipType="http://www.w3.org/2005/08/addressing/reply">urn:uuid:020C911C16EB130A8F1204119836321
</wsa:RelatesTo>
</soapenv:Header>
<soapenv:Body>
<NS1:PingResponse xmlns:NS1="http://ibm.com">
<NS1:PingResult>Ping</NS1:PingResult>
</NS1:PingResponse>
</soapenv:Body>
</soapenv:Envelope>