Creating a method wrapping an M3 API program

M3 API consists of two distinct parts: the Client Interfaces and the M3 Interfaces.

  • The Client Interfaces are the low level functions that are used in different environments to access the M3 Interfaces.

  • The M3 Interfaces consist of the transaction descriptions and the MI (M3 Interface) programs in the Application Server.

Use this procedure to create a method wrapping an M3 API program.

  1. In the Web Service Repositories view, expand the repository location where the web service is located for which you want to create a method.
  2. Select the web service for which you want to create a method and right-click.
  3. Select New method.

    The Create a new Web Service Method window is displayed.

  4. Select M3 API (MI program) from the Type drop-down list and click Next.
  5. Select a server from the drop-down list and click Next.
  6. Select the applicable configuration from the list of configurations and click Next.

    The Select M3 API user and password window is displayed.

  7. Specify your M3 server user name and password to authenticate the configuration that you selected in the previous step and click Next.

    A list of M3 API programs is displayed.

    Select a program and expand it to choose the transaction for which you want to create the method.

    Note: As shown in the picture above, it is possible to select multiple transactions, and a method for each transaction will be created.
  8. Select the check box Create field alias if you want the aliases for the field name to be displayed in the Alias column of the API Editor.

    See information about aliases in Common functions.

  9. Specify a name for the method in the Name field and click Finish.

    It is recommended that you provide a name that describes the functionality. For example, AddBatchLine, AddBatchText, AddLineBatchEnt, AuthCreditCard.

    The name must conform to the XML naming rules. See information in http://www.w3.org/TR/REC-xml/.

    Click Finish.

    The method is displayed in the Web Service Repositories view and the details are displayed in the editor on the right side. See information on the M3 API Editor in M3 API Program Editor.