Create the list-customers web service operation

This is an AQL web service that selects items from the MVDEMO CUSTOMERS for a given state.

Procedure

  1. Right-click the mvs Web Service from the MV Web Service Explorer and select the Create Web Service Operation option.

    The Create a Web Service Operation dialog box opens.

  2. Select localserver from the Database Connection drop-down, and then click Connect to display the list of accounts.
  3. Select the MVDEMO account from the Account drop-down, and then click Next.

    The Select a Web Service Operation Type dialog box opens.

  4. Select the AQL Statement option, and then click Next.

    The Construct the AQL Statement dialog box opens.

  5. Type list-customers in the Operation Name text box and select the CUSTOMERS file from the File Name drop-down list.
  6. Select the Selection Criteria tab.

    You will see the Selection Criteria tab.

  7. Click Add to add your selection criteria.
  8. Click the top-most cell in the Attribute Name column and select the STATE ADI.
  9. Click the top-most cell in the Relational Operator column and select the = (equals) operator.
  10. Click the top-most cell in the Value column and type @STATE.
    This will generate a variable in the Web Service Operation and its value will be supplied by the client.
  11. Select the Sort Criteria tab.

    You will see the Sort Criteria tab.

  12. Click Add to add your sort criteria.
  13. Click the top-most cell in the Attribute Name column and select the ORGANIZATIONNAME ADI.
  14. Click the top-most cell in the Sort Order column and select the Ascending order.
  15. Click Finish to create the Web Service Operation.