Web Service node properties dialog box

The rest of this document describes the available options on the Web Service node properties dialog box. For ease of discussion, the section is divided into four parts:

  • Main controls

  • SOAP XML Builder wizard

  • E4X input string

  • Output wizard

The subsections that follow provide additional details. (The Description tab works the same as with other activities and, therefore, is not discussed here.)

Main controls

The main controls control the overall behavior of the node and also specify the WSDL to be used in the SOAP XML Builder Wizard and Output Wizard. The main controls are on the "Service" and "Input" tabs of the Properties dialog box.

Property What it means
Definition URL

The Definition URL text field is used to select the WSDL (Web Service Definition Language) file to be used in the SOAP XML Builder and XML Output wizards. The URL can point to a local file or a web address. This is similar to the XML node’s "Schema URL" field, except that a Web Service requires a WSDL not just a schema. WSDLs supported by the Web Service node contain one or more schemas (or references to them).

The popup menu for the Definition URL field holds a list of previously loaded WSDL files.

Using a WSDL is not absolutely required, but is strongly recommended. The WSDL is used at design time by the SOAP XML Builder wizard to help you create an E4X XML string, to show the expected output in the Output Wizard, and also to discover the Soap Location and Soap Action values.

File The File… button can be used to select a local file using a file dialog box.
Load Use the Load button to load a schema after typing in the URL in the Definition URL field.
Service The Service popup menu contains a list of Services defined by the selected WSDL.
Port The Port popup menu contains a list of Ports defined by the selected WSDL for the selected Service.
Operation The Operation popup menu contains a list of Operations defined by the selected WSDL for the selected Service and Port. The selected Operation determines the input and output expected by the web service, which is shown in the SOAP XML Builder and XML Output wizards.
Hide Empty Assignments Select this check box if you want to hide nodes that do not have assigned values.
SOAP Location The SOAP Location field holds the URL for calling the selected port of the selected Web Service. This is determined from the WSDL based on the selected service and port.
SOAP Action The SOAP Action field holds the action URI for the selected operation of the selected Web Service. This is determined from the WSDL based on the selected service, port and operation.
Stop Process on Error

When the Stop Process on Error check box is checked, the process will be stopped when there is an error in calling the web service. If the check box is unchecked, process execution will continue after an error, and the subsequent nodes should check the NODENAME_errorCode and NODENAME_returnMessage variables for error status information.

The Web Service node can only detect web service faults (exceptions) or failures in contacting the web service. The node cannot automatically detect error or result codes returned as part of the web service output. These codes depend on the specific format of the output defined by the web service itself. You must check any such error or result values yourself using a Branch node.

SOAP XML Builder wizard

The SOAP XML Builder Wizard is identical to the XML Node’s XML Builder Wizard, except the XML format is that of a SOAP XML call, with SOAP Envelope, Header and Body elements. One difference is that selecting a root node is not required. This is because the root node or nodes are always determined from the WSDL. More information is available in the documentation for the XML Activity’s XML Builder Wizard.

Input E4X string

The input E4X string holds a single JavaScript expression that will be evaluated at runtime and parsed into an E4X XML object. This is usually used to specify a single string or binary variable to parse into XML.

The "Variable" column is used to supply variables that will be assigned the value from the node when the XML is parsed. Variables have the following properties:

  • The variable name can be specified with or without the E4X curly braces. Both of the following are acceptable:

    a

    {a}

  • The variable name does not need to be defined previously. If it is defined, then the variable will be updated.

    If the variable is not previously defined, it will be defined and the value will be set from the node.

  • If the variable is defined as String, but the schema node property specifies "maxoccurs > 1" and if there are multiple occurrences of the node in the parsed XML, the variable will be converted into an array.

    Example: Parsed XML:

    <foo>
        <bar>baz 1</bar>
        <bar>baz 2</bar>
    </foo>
    

    The variable "baz" is defined as String in the Start node. When above XML is parsed, the variable "baz" will be converted to an array and it will hold the two values {baz1, baz2}.

    If there is one occurrence of the node in the parsed XML, the variable will be left as String.

Output wizard

The Web Service Activity’s Output Wizard is almost identical to the XML Activity’s Output Wizard. The only difference is that the output would be coming from the Web Service, so the expected output is most likely different from the input. Both the input XML format and the expected output are discovered from the WSDL at design time, as described above.

In order to find the correct E4X syntax to retrieve information from the returned data, you can look on the output tab of the build wizard. In the node section of the output tab, expand the list until you find the value you are looking for. Once found, click on the value so that it is highlighted. At the bottom of the wizard, in the node description section, the first line will display the output variable path. This will give you the E4X syntax you want to use when assigning values to variables within your process.

The following is an example of returned data from a web service node that finds the weather forecast based on a given zip code.

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <soap:Header/>
  <soap:Body>
    <GetCityForecastByZIPResponse xmlns="http://ws.cdyne.com/WeatherWS/">
      <GetCityForecastByZIPResult>
        <Success>true</Success>
        <ResponseText>City Found</ResponseText>
        <State>MN</State>
        <City>Saint Paul</City>
        <WeatherStationCity>Minneapolis</WeatherStationCity>
        <ForecastResult>
          <Forecast>
            <Date>2014-08-13T00:00:00</Date>
            <Desciption>Partly Cloudy</Desciption>
            <Temperatures>
              <MorningLow>63</MorningLow>
              <DaytimeHigh>83</DaytimeHigh>
            </Temperatures>
          </Forecast> 
      </GetCityForecastByZIPResult>
    </GetCityForecastByZIPResponse>
  </soap:Body>
</soap:Envelope>

To retrieve the state that the specified zip code belongs to, use this E4X syntax:

WebSvc_output.*::Body.*::GetCityForecastByZIPResponse.*::GetCityForecastByZIPResult.*::State