Setting up Data Inputs to and Outputs from the Web Service

Data fields (and/or formal parameters) must be used to define the inputs to and outputs from the web service. The data fields must be mapped to the matching message input and output parts in the WSDL document.

In Project Explorer, expand the Generated Services folder and double-click the UKAddressService.wsdl file. The WSDL document is displayed in the WSDL Editor.

Note: If the WSDL source view is displayed click the Design tab at the bottom of the WSDL Editor.

The WSDL document indicates that the service accepts a single input parameter (addressQuery) and returns a single output parameter (address).

Procedure

  1. Select the Find address service task.
  2. In the Properties view for this task, click the Interface tab. Note the data that has been defined for this activity (by the analyst, in order to hint at the correct data to send and assign):
    • postcode and country are defined as both inputs and outputs. The values of these fields should be sent to the web service, then updated with the data returned by the web service.
    • addressLine1, addressLine2, city and province are defined as outputs. Values should be assigned to these fields from the data returned by the web service.
  3. In the Properties view, Input to Service tab, leave the Script Grammar set to JavaScript. Note that:
    • the right-hand side (service input parameters) has been automatically populated with the input parameter defined in the WSDL file (addressQuery).
    • the left-hand side (process fields/formal parameters) has been automatically populated with the data fields and formal parameters defined on the Interface tab of the Find address service task.
  4. Expand addressQuery, then click and drag the postcode data field on to the postalCode input parameter to create a data mapping. When the process calls the web service, the value of postcode will be passed to the web service.

    Similarly, drag the country data field to the country input parameter.

  5. In the Properties view, Output from Service tab, leave the Script Grammar set to JavaScript. Note that the service output parameters (on the left-hand side) and process data fields (on the right-hand side) have been similarly automatically populated.
    Note: On mapping tabs, the source of the data to be transferred is always on the left-hand side and the target is always on the right-hand side
  6. Expand address, then click and drag the different output parameters to their corresponding data fields to create the required data mappings.
  7. Save the project.