Generating JavaScript

You can generate JavaScript for a Web service provided by or consumed by JADE.

To generate JavaScript for a Web service consumer

  1. In the Web Service Consumer Browser, select the consumer subclass with which you want to interact.

  2. Select the Generate JavaScript command from the Consumer menu.

    The Web Service JavaScript Generation dialog, shown in the following example, is then displayed.

  3. If you want the JavaScript files created in a directory other than the program directory, enter the location in the Output Directory text box. Alternatively, click the Browse button and the common file Open dialog is then displayed to enable you to select the appropriate location.

  4. Enter a namespace in the Module Namespace text box. The namespace refers to the root JavaScript variable name that the generated scripts use. For example, if the namespace is Jade, the instruction to call a Web service from JavaScript would be in the following format.

    Jade.<provider>.<method>(<parameters>);
  5. Click the Generate button. Alternatively, click the Cancel button to abandon your selections.

    A number of JavaScript (.js) files are created in the specified directory.

To generate JavaScript for a Web service exposure

  1. In the Exposure Browser, select the Web service exposure for which you want to generate JavaScript.

  2. Select the Generate JavaScript command from the Exposure menu.

    The Web Service JavaScript Generation dialog, shown in the following example, is then displayed.

  3. If you want the JavaScript files created in a directory other than the program directory, enter the location in the Output Directory text box. Alternatively, click the Browse button and the common file Open dialog is then displayed to enable you to select the appropriate location.

  4. Enter a namespace in the Module Namespace text box. The namespace refers to the root JavaScript variable name that the generated scripts use. For example, if the namespace is Jade, the instruction to call a Web service from JavaScript would be in the following format.

    Jade.<provider>.<method>(<parameters>);
  5. Select a Web service provider application that uses the exposure in the Web service application combo box. This enables the generated JavaScripts to access the correct application.

  6. Click the Generate button. Alternatively, click the Cancel button to abandon your selections.

A number of JavaScript (.js) files are created in the specified directory.