この例は、ローカル環境内の参照パラメーター設定と、そのツリー上に表示される際の対応メッセージについて示しています。
この例では、Web サービスは簡単な ping 操作を公開します。
以下の ESQL 例は、ローカル環境におけるアドレッシング・ヘッダーの指定方法を示しています。
DECLARE Example_ns NAMESPACE 'http://ibm.namespace';
SET OutputLocalEnvironment.Destination.SOAP.Request.WSA.ReplyTo.ReferenceParameters.Parameter1 = 'Message Broker';
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';
以下は、上記の ESQL の使用後に生成された ReplyTo 参照パラメーターと FaultTo 参照パラメーターを使用した、SOAPRequest ノードからのメッセージにある出力 SOAP エンベロープの例です。 また、ローカル環境に設定されていないものの、WS-Addressing を採用した結果としてノードによって自動的に生成される、他のメッセージ・アドレッシング・プロパティー (MAP) を示しています。
<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>Message Broker</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>
上記の例では、ReplyTo および FaultTo エンドポイント参照 (EPR) 用に参照パラメーターが設定されます。 このメッセージを WS-Addressing を使用して SOAPInput ノードに送信する場合、「WS-Addressing ヘッダーを LocalEnvironment に配置」プロパティーが選択されているのであれば、こうした ReferenceParameters は SOAPInput ノードが含まれているフローのローカル環境に配置されてそのフローによって使用されます。 このオプションが変更するのはローカル環境に配置される対象だけで、応答メッセージの内容は変更しません。
以下の SOAP エンベロープは、SOAPReply ノードによって送信される、上記の出力メッセージへの応答です。 この例は、SOAPReply ノードによって自動的に行われる MAP 処理を示しています。 この例では、応答は SOAP 障害ではないため FaultTo 参照パラメーターはありません。 またこの応答は、ReplyTo EPR に属する参照パラメーターが応答メッセージ内で表示される場所も示しています。
<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">Message Broker</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>