This topic describes the SOAPExtract node.
This topic contains the following sections:
This node can remove SOAP envelopes, allowing just the body of a SOAP message to be processed. It can also route a SOAP message based on its operation name. Both functions are optional; they are contained within one node because they are often used together.
Ensure that the message parser options in the properties folder of the outgoing message are correctly set up to parse the message, by copying the message set and message format across from the incoming message. The message type is derived from the SOAP envelope message body first child.
Only a single child of the SOAP message body is supported.
The SOAPExtract node is represented in the workbench by the following icon:
Look at the following sample to see how to use this node:
When you have put an instance of the SOAPExtract node into a message flow, you can configure it. The properties of the node are displayed in the Properties view.
Full validation is not done on the SOAP message, which just needs to contain a body element.
The terminals of the SOAPExtract node are described in the following table:
Terminal | Description |
---|---|
In | The input terminal that accepts a SOAP message for processing by the node. |
Out | The output terminal that outputs the SOAP message body (without the envelope if the Remove Envelope check box is selected on the node properties). |
Failure | The output terminal to which the message is routed if a failure is detected during processing. |
The following tables describe the node properties. The column headed M indicates whether the property is mandatory (marked with an asterisk if you must enter a value when no default is defined); the column headed C indicates whether the property is configurable (you can change the value when you add the message flow to the bar file to deploy it).
The Description properties of the SOAPExtract node are described in the following table.
Property | M | C | Default | Description |
---|---|---|---|---|
Node name | No | No | The node type | The name of the node. |
Short Description | No | No | A brief description of the node. | |
Long Description | No | No | Text that describes the purpose of the node in the message flow. |
The Basic properties of the SOAPExtract node are described in the following table.
Property | M | C | Default | Description |
---|---|---|---|---|
Remove Envelope | Yes | Selected | Draft comment:
What are the M and C settings for each of these options? If you select the check box, the node removes the SOAP header from the message. For a SOAP tree, the node outputs to the Out terminal the first child of SOAP.body from the SOAP tree. It outputs to Envelope Destination the full SOAP tree minus the first child of SOAP.body. If you clear the check box, the node leaves the envelope on the message. In the case of a SOAP tree, the full tree is propagated to the Out terminal. |
|
Envelope Destination | $LocalEnvironment/ |
An XPath expression that represents the destination
to which the node will copy the SOAP envelope. The following correlation names
are available:
|
||
Destination Path Mode | Create Path | This determines the behavior of the Envelope Destination
property. Set it as follows:
|
||
Route to 'Operation' Label | Cleared | This determines whether the node should route the message
to the SOAP operation given in the message. If you select the check box, the message is routed to a label node that matches the SOAP operation. An exception is thrown if no label node matches. The name of the first child element of the SOAP body is used to determine the RouteToLabel name. For the ‘RPC literal’ and ‘wrapped doc literal’ WDSL types, this is the ‘operation’ name. For a SOAP tree, the first child of SOAP.Body supplies the operation name. If you clear the check box, the node sends the message to the Out terminal. |
||
Label Prefix | The value to prefix to the label that the node uses for routing. This is to allow for name spacing between subflows. |
<?xml version="1.0"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://ws3.st.mqsi.ibm.com/App/DocLiteral1" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Header> <tns:requestHeader> <tns:assessorUrl>header1</tns:assessorUrl> </tns:requestHeader> </soapenv:Header> <soapenv:Body> <tns:requestAvailability> <tns:carDetails>body1</tns:carDetails> <tns:claimID>body2</tns:claimID> <tns:location>body3</tns:location> <tns:reqDate>body4</tns:reqDate> </tns:requestAvailability> </soapenv:Body> </soapenv:Envelope>
The operation name is requestAvailability. Note that the namespacing is removed from the operation.
<?xml version="1.0"?> <tns:requestAvailability xmlns:tns="http://ws3.st.mqsi.ibm.com/App/DocLiteral1" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <tns:carDetails>body1</tns:carDetails> <tns:claimID>body2</tns:claimID> <tns:location>body3</tns:location> <tns:reqDate>body4</tns:reqDate> </tns:requestAvailability>
<?xml version="1.0"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://ws3.st.mqsi.ibm.com/App/DocLiteral1" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Header> <tns:requestHeader> <tns:assessorUrl>header1</tns:assessorUrl> </tns:requestHeader> </soapenv:Header> </soapenv:Envelope>