Create a web service operation (AQL statement)

Complete these instructions to create a Web Service Operation based on an AQL statement.

  • These instructions apply only to Web Services created with the SOAP Service Type option.

    See Create a web service for more information.

  • Step 1 is not necessary if you chose to create a Web Service Operation at the end of the Create a Web Service wizard.

    See Create a web service for more information.

Procedure

  1. Right-click the Web Service in which to create the new Web Service Operation from the MV Web Service Explorer and select the Create Web Service Operation option.

    The Create a Web Service Operation dialog box opens.

  2. Provide the appropriate values for each of the following parameters, and then click Next:
    Parameters Description
    Database Connection Select the database connection that contains the account and data you need to access for creating the operation.
    Tip: If you need to define a new database connection for the operation you are creating, click the New button to define the connection. When the connection definition has been created, click the Connect button to connect to the database. See Create MV server connections for a description of the required parameters for defining a database connection.
    Account Select the account that contains the data you need to access for creating the operation.
    Password Password for the specified account.
    Advanced Button Opens the Connection Pool Settings dialog box. The following parameters can be specified:
    Min Connections Minimum number of connections to the D3 or mvBase server. The default is 0.
    Max Connections Maximum number of connections to the D3 or mvBase server. The default is 0.
    Idle Timeout Length of time (in seconds) before the connection is dropped due to inactivity. The default is 300 seconds.

    The Select a Web Service Operation Type dialog box opens:

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

    The Construct the AQL Statement dialog box opens.

  4. Type a name for the operation you are creating in the Operation Name text box.
  5. Select the file to be queried by the AQL statement you are about to construct from the File Name drop-down.

    The Output Specification tab is populated with the columns contained in the specified file. Also included in the tab are the Substitute-ID, Type, Attribute, Substitute-Header , Conversion, Correlative, Justification, and Length specifications for each of the listed columns.

    Note:
    • The ID column is used in the output of the web service. To use a different name, click in the Substitute-ID column and enter the alternate name.
    • Web services require that dictionary names begin with a letter and can only include letters, numbers, periods, hyphens, and dashes. Any other character will cause an error to display and the dictionary item will not be included in the list.
    • The previous 5 steps can be accomplished more expediently by dragging the preferred file from the MV Server Explorer and dropping it into a defined Web Service in the MV Web Service Explorer. This displays the Construct the AQL Statement dialog box (illustrated above) with all of the columns populated. Note that the Operation Name and File Name text boxes will be automatically populated as well, but you can change the names if you prefer.

    Also note that the actual AQL statement that you are in the process of constructing displays in the AQL Statement section of the screen (below the tabs section). The AQL statement displayed changes dynamically to match any changes you make to the Output Specifications, Selection Criteria and Sort Criteria.

    Tip: Click column headers to sort the list ascending or descending by the data in that column.
  6. Select or deselect the columns to include in the AQL statement.
    Use the Select All and Unselect All buttons if they can facilitate your selection process.
  7. Select the Selection Criteria tab to specify any selection criteria you want to include in the AQL statement.
    • Click Add to add a new selection criteria to your AQL statement.

      After clicking Add, specify your criteria by clicking in the applicable table cells beneath the Attribute Name, Relational Operator, and Value column headings. If multiple selection criteria clauses are added, a Logical Operator must also be specified.

      Note: In the Value column, you can enter a literal value or create a variable to be passed to the AQL statement. To create a variable, the value must begin with the @ character (for example, @STATE). This will then create a variable named STATE and its value will be supplied in the SOAP request. Web Service Operation variables are listed in the web service test dialog allowing you to provide a value prior to executing the operation.
    • Click Move Up and Move Down to change the order of the selection criteria in your AQL statement.
    • Click Remove to remove a selection criteria clause from your AQL Statement.

    The following example illustrates a sample selection criteria specification.

  8. Select the Sort Criteria tab to specify any sort criteria you want to include in the AQL statement.
    • Click Add to add a new sort criteria to your AQL statement.

      After clicking Add, specify your criteria by clicking in the applicable table cells beneath the Attribute Name and Sort Order column headings. Multiple sort criteria clauses can be added.

    • Click Move Up and Move Down to change the order of the sort criteria in your AQL statement.
    • Click Remove to remove a sort criteria clause from your AQL statement.

    The following example illustrates a sample sort criteria specification.

  9. When you have completed specifying your output specifications, selection criteria, and sort criteria from your AQL statement, click Finish.

    The Web Service Operation is saved and the operation name displays in the MV Web Service Explorer. To test the operation, see Test a web service.

    To edit the operation, see Edit a web service operation or resource.

    Tip: Web Service Operations can be copied to another Web Service or Web Service Provider from the MV Web Service Explorer. To copy an Operation  to another Web Service or Web Service Provider, drag the Operation from the current Web Service or Web Service Provider to the new Web Service or Web Service Provider and respond to the system accordingly.