To map the CreatePurchaseOrder operation
- Open the Purchase Order Web Service you created in To-create-your-web-service.
- Open the panel for the Create Operation called CreatePurchaseOrder.
- Create the input mapping.
- Select XML Schema from the Data Source Type list under Input Mapping.
- Click Choose, and then click OK to verify that you want to proceed with input mapping.
- In the Choose Start Element dialog box, select PurchaseOrder and click OK.
Choose Start Element dialog box
(Click the image to expand it.) - Select the ROOT element in the XML Data Type column.
Note that ROOT is already mapped to the Purchase Order form.
Mapping for the CreatePurchaseOrder operation
(Click the image to expand it.) - Click Primary Key in the Mapping Info column.
- Click the ellipsis button to open the Field Selector.
Primary Key selection - Select PO ID as your primary key, and click OK twice.
- 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.
- Under the Items element in the XML Data Type column, select the Item element.
- In the Form/Field column, click the empty table cell adjacent to the Item element.
- Click the ellipsis button, and select the Line Items form and click OK.
The Item element is now mapped to the Line Items form. - Click Distinguishing Key/Foreign Key in the Mapping Info column.
Distinguishing Key and Foreign Key selection
(Click the image to expand it.) - Click the ellipsis button next to the Distinguishing Key field.
Use the Field Selector to select the Item ID field, and click OK.
- In the same manner, specify a Foreign Key value of Line Item PO ID.
- Click OK to confirm your key selections.
- Map the other fields from the Line Items form as follows:The [confluence_table-plus] macro is a standalone macro and it cannot be used inline.
- Create the output mapping.
- Select Generated from the Data Source Type list.
- Click Auto Map, and click OK to verify that you want to proceed with output mapping.
The ROOT element in the XML Data Type column is mapped to the Purchase Order form. - In the Mapping Info column, change the Primary Key to PO ID.
- Verify that the Request ID element is mapped to the Request ID field.
Your output mapping table should look similar to the one in step 3d.
- In the Properties tab, assign Public permissions for the web service.
- Click File > Save.
Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*