Default language.

To map the GetPurchaseOrder operation


  1. Open the Purchase Order Web Service you created in To-create-your-web-service.
  2. Open the panel for the Get Operation called GetPurchaseOrder.
  3. Create the input mapping.
    1. Select Generated from the Data Source Type list under Input Mapping.
    2. Click Auto Map.
    3. Click OK to verify that you want to proceed with input mapping, and select the standard Get operation mapping option.
       By default, the input map should contain two XML elements — ROOT and Request_ID.
    4. Click the Request_ID element, and change the name to POID.
       Your input mapping table should look similar to the one in the following figure.
    5. In the Qualification field, replace the qualification with this text: 


      'PO ID' = XPATH(/ROOT/POID)

       

      Tip

      You can type or paste the text, or you can use the Expression Editor to build the qualification. To open the Expression Editor, click the ellipsis button.

       Mapping for the GetPurchaseOrder operation 
       (Click the image to expand it.)
      web_services_examples_getpo_map.gif

  4. Create the output mapping.
    1. Select XML Schema from the Data Source Type list under Output Mapping.
    2. Click Choose, and click OK to verify that you want to proceed with output mapping.
    3. In the Choose Start Element dialog box, select PurchaseOrder and click OK (see Choose start element dialog box).
    4. Select the ROOT element in the XML Data Type column.
       Note that ROOT is already mapped to the Purchase Order form.
    5. Click Primary Key in the Mapping Info column.
    6. Click the ellipsis button to open the Field Selector (see Primary Key selection).
    7. Select PO ID as your primary key, and click OK twice.
    8. Map the fields from the Purchase Order form as follows:The [confluence_table-plus] macro is a standalone macro and it cannot be used inline. Click on this message for details.
    9. Under the Items element in the XML Data Type column, select the Item element.
    10. In the Form/Field column, click the empty table cell adjacent to the Item element.
    11. Click the ellipsis button, then select the Line Items form and click OK.
       The Item element is now mapped to the Line Items form.
    12. Click Distinguishing Key/Foreign Key in the Mapping Info column (see Distinguishing Key and Foreign Key selection).
    13. Click the ellipsis button adjacent to the Distinguishing Key field.
    14. Use the Field Selector to select the Item ID field, and click OK

      Note

      The AR System server does not allow the mapping of an integer as the distinguishing key during the consumption of a web service.

    15. In the same manner, specify a Foreign Key value of Line Item PO ID.
    16. Click OK to confirm your key selections.
    17. Map the fields from the Line Items form as follows:The [confluence_table-plus] macro is a standalone macro and it cannot be used inline. Click on this message for details.
  5. In the Properties tab, assign Public permissions for the web service.
  6. Save the web service.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*