Result Node

The Result Node window shows the structure of the HTML or XML stream as an HTML/XML stream tree, and lets you define your Web service response based on the contents of the HTML/XML stream.

You have two options in defining your Web service response:

The Result Node window is divided into two sections:

The HTML/XML Stream section shows the structure of the HTML or XML stream from the URL you specified in the previous step (either the XML or HTML Stream URL window or the Sample Input window).

If you want the entire HTML stream to be part of your Web service response, ignore this HTML/XML Stream section and select the first option Return the entire HTML/XML Stream as the Web service response in the Web Service Response section, then click Next at the bottom of the window to continue to the next step.

If you want just the parent node that contains the complete set of service results in the HTML/XML stream and define this to be your Web service response, first navigate to the desired element in the HTML/XML stream tree, then navigate to the parent node by moving up the HTML/XML stream tree.

You can quickly locate the desired element in the HTML/XML stream tree by entering its name in the Find field and clicking Next at the end of this field. The name of the element is highlighted in the HTML/XML stream tree. You can navigate to the next or previous occurrence of this element by clicking Next or Previous at the end of the Find field.

From the highlighted element of interest, navigate to the parent node that contains the complete set of service results by moving up the tree until you locate that parent node. The parent node is usually the next lowest table row node (xhtml:tr) located above the desired element node.

Note that the Node Location field contains the complete name of the highlighted parent node you selected.

The Web Service Response section lets you define the Web service response as either the entire HTML/XML stream, or as the parent node you selected in the HTML/XML Stream section. If the parent node contains siblings, you can optionally select them all to be included in the Web service response. If you choose to include all the siblings in the Web service response, you can click Advanced Settings to enter a predicate that filters the set of sibling nodes, view the resulting Xpath, and view or edit the Repsonse element name.

If you want the entire HTML/XML stream to be part of your Web service response, select the first option Return the entire HTML/XML Stream as the Web service response, then click Next at the bottom of the window to continue to the next step, the Service Response Fields window.

If you want just the parent node that contains the complete set of service results in the HTTP response, select the second option Define the Web service response from the selected node. When you make this selection, another option is now available and that is whether or not to include all the siblings of the selected node in the response.

If the node you selected has siblings that you want to include in the Web service response, select the option Include all the siblings of the selected node in the response. If there are no siblings to include in the Web service response, do not select this option. When you make this selection, an Advanced Settings button appears. Click Advanced Settings to display the Advanced Settings pop-up window where you can enter a predicate that filters the set of sibling nodes, view the resulting Xpath, and view or edit the Response element name.

The following predicate filters out the first position: position() != 1. Enter this predicate expression in the Predicate that filters the set of sibling nodes field of the Advanced Settings pop-up window to filter the first sibling from the Web service response.

For more information about predicates, filters, syntax, and composing a predicate expression, see the Xpath section of the following Web site: HTTP://www.w3c.org/TR/xpath

Click OK in the Advanced Settings pop-up window to save your changes or click Cancel to cancel this operation. Either action returns you to the Result Node window.

At the Result Node window, if you have completed your selections, you can: