You are here: Working with Workflows > Calling Web services with form events

Calling Web services from workflow or form events

You can use Designer to configure Winshuttle Web services from within a workflow. When they are configured in the workflow, the Web services may be called from InfoPath form events or from within the workflow.

On this page

Adding a Web service

Back to top

  1. On the Tools menu, click Manage Field Mappings.
  2. In the Manage Field Mappings dialog box, click Add.
  3. Enter Name of the Web service, Description, and WSDL of the Web service. For example:

  4. XML group name is the name of the parameter group that will be created in the InfoPath form data source. Do not use spaces, numbers, or special characters in this name.
  5. You can select Windows Authentication or Network credentials for the user login type.
  6. In the New Web Service dialog box, click Test to validate credentials for retrieving WSDL fields from CENTRAL.

    New Web Service Screenshot

  7. Do one of the following:
    • If you are creating a new form, select Generate InfoPath form.

    -or-

    • If you are using an existing form, select the Use select the Use Existing Fields option before generating the InfoPath form. When you select an existing InfoPath form, the existing fields of the form are retained without generating new fields. If you do not select the Use Existing Fields option, the new form will contain similar named fields appended with auto numbers.
  8. If it must be mandatory for users to enter SAP credentials for the form and to call the Web services, select the option Use SAP Credentials. If you do not select the Use SAP credentials option, SAP credentials are read from CENTRAL.
  9. The Generate InfoPath Form button generates and saves the form created for InfoPath. You can then launch and modify the form as required.
  10. Winshuttle Designer maps fields with InfoPath Designer fields by default.

    Note: If field changes trigger Web services, and the Web services are dependent on the results of other web services, ensure that the Web services are mapped in the correct order. Use the Form Field list to reorder fields as needed.

  11. If you select an existing InfoPath form, the existing fields of the form are also available for mapping.

    Field mapper screenshot - Designer

  12. If you reuse a Web service with identical input and output fields, the form fields will have a suffix that includes a number with underscore. Click the arrow to select the accurate field name.

Modifying or deleting a Web service

Back to top

  1. Click Edit on the Winshuttle Web services screen to modify an existing Web service.
  2. Click Delete to remove a selected Web service.

Using Winshuttle Transaction loops in Web services

Back to top

You can add any number of transaction Web services with loops to one form; however, two transaction Web services with (multiple) loops should not be added to the same XML group. In this case, each transaction Web service with loops requires its own XML group (otherwise there will be problems during the SAP data upload process).

Note: If you have multiple Transaction scripts and each has a single loop, you can add all of the scripts to a single XML group.

It is also important to note that all fields inside loops will be generated again with a new name if that field name does not exist in exactly the same XPATH (the location in InfoPath). Additionally, mapping fields in a repeating section on fields of any other section within a loop must exist under the same repeating section.