Create a web service operation (cataloged subroutine)

Complete these instructions to create a Web Service Operation based on a cataloged subroutine.

Prerequisites

About this task

These instructions apply only to Web Services created with the SOAP Service Type option. 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.
    Parameter 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 Select a Web Service Operation Type dialog box opens.

  3. Select the Cataloged Subroutine option, and then click Next.

    The Select the Cataloged Subroutine dialog box opens.

  4. Type a name for the operation you are creating in the Operation Name text box.
  5. Do one of the following:
    • Type the name of the subroutine to use for the operation you are about to define in the Subroutine drop-down.
    • Click List to populate the Subroutine drop-down with all of the subroutines defined on the account and then select the subroutine to use for the operation you are about to define.
      Note:
      • If there are a significant number of subroutines defined on the account, the list operation might take some time to complete. In such cases, it is recommended that the subroutine name be explicitly typed in the Subroutine drop-down.
      • Any cataloged subroutines in the dm,bp, or sql,bp, files, or any BP file name that starts with MVSP, will not be in the list.

    The Arguments table is populated with the arguments contained in the specified subroutine, including the argument #,  Name, Usage, Binding Mode, and Data Type.

    The default Binding Mode is always set to simple and the default Data Type is always set to string.

    Tip: The previous five steps can be accomplished more expediently by dragging the preferred subroutine from the MV Server Explorer and dropping it into a defined Web Service in the MV Web Service Explorer.

    This displays the Construct the Cataloged Subroutine dialog box with all of the columns populated. The Operation Name and Subroutine text boxes are automatically populated as well, but you can change the names if you prefer.

  6. Do any of the following:
    • To define the subroutine's arguments to the operation, select an argument from the table and click Edit. Multiple arguments can be selected and edited simultaneously.
    • To create a new argument for the operation, click Add.
    • To delete one or more arguments, select the arguments to delete and click Delete.

    The Define Argument dialog box opens.

  7. Specify the appropriate values for the subroutine's Arg#, Name, Usage, Binding Mode, and Data Type arguments.

    For information on data typing, see D3 processing code mapping to XML datatypes.

    Note: If the dynamic-array Binding Mode is selected, the Dynamic Array Name text box displays in the dialog box (in place of the Data Type drop-down).
  8. When you are done defining the argument, click OK.
  9. When you have completed defining all of the subroutine's arguments to the operation, click Finish.

    The Web Service Operation is saved and the operation name displays in the MV Web Service Explorer.

    If the dynamic-array Binding Mode was selected for any of the defined arguments in the subroutine, the dynamic arrays are displayed in the MV Web Service Explorer below the new Web Service Operation. For example:

  10. Do any of the following: