You are here: Getting Started > Tutorials > Tutorial 3: Building advanced forms and workflows > T3-11. Publish a script as a Web service

Tutorial 3—Step 11: Publish Transaction script as a Web service

In this exercise you will publish a script as a Web service and integrate the Web service into a form.

  1. Open Winshuttle TRANSACTION.
  2. Choose a script to work with.

    Select a simple script. In this example, we will be using a script that will download current data for a user to see.

  3. Double-click the script selected in step 2.
  4. On the left side, under Map, click Update Mapping to convert the script to XML.
  5. Click Change Source Type and then select XML Forms from the drop menu.

  6. Click Save.

  7. Close Winshuttle Transaction.
  8. Open Winshuttle Designer.
  9. Click File, point to New, and then select Winshuttle Solution for Forms.
  10. Make sure your Development Deployment Profile is correctly configured (refer to Exercise 1 for instructions).
  11. In the Winshuttle Solution Tree Window, right-click Transaction Scripts and select Import.

  12. Select a Winshuttle TRANSACTION Script that you would like to work with.
  13. Select the Winshuttle TRANSACTION Script added in the previous step. In the Properties Pane, under Transaction Script, set the IsOverwriteAllowed Property to True

  14. On the toolbar, click Tools, and then Manage Field Mappings.

  15. Click Add.

  16. From the Script Name drop down list, select the Winshuttle Script you added to your solution.

  17. In the XML Group Field, enter a name for the XML Group that will hold all of the XML Fields for this Script. (Spaces, numbers, and special characters are not allowed in the name.) Click OK.
  18. Click Generate InfoPath Form, and then click OK.

  19. In Winshuttle Designer, click Save to save your changes.
  20. From the Winshuttle Designer toolbar, click Launch InfoPath.

    In InfoPath, notice that the form is already made for us and all of the fields are already created in the Fields section.

  21. In the Fields section, expand your folder to show the Input Fields.

  22. Click and drag your Input folder into the form.
  23. On the form, delete the SAPUser and SAPPassword fields as well as the text. (They aren't needed for this exercise.)
  24. Return to the Fields section and then expand your output folder.
  25. Drag the output folder to the form below your last field.

    NOTE: To improve readability, press Enter twice in between the last Input field and the first Output field.

  26. Save your form.