Run a REST Web service application from Genero Studio

Update the properties of the configuration node to run a Web service application.

In the Genero Business Development Language User Guide, you learn how to code a Genero Web service application using the REST high-level framework; however, all instruction for compiling and running the application assumes you are using the command line tools.

In this topic, you will learn how to launch the Web service application from Genero Studio.

Steps

  1. Add an application node to your project.
    This application node will serve as your main node for these instructions.
  2. Add your application source files to the application node.
    In addition, you may need to add database schema files, an fglprofile file, and other resources as required by the Web service application.
  3. Add a configuration node to the application node.
    With the configuration node added, you have three properties to set.
    Figure: Configuration node properties for a REST Web service

    Screen shot of Properties view with BinaryName, Web service, and Web service URL suffix set.
    1. Set the BinaryName property.
      • If the Language of the application node is "Genero", BinaryName will be the name of the application node.
      • If the Language of the application node is "Genero (no link)", BinaryName will be the name of the source module containing the application's MAIN block.
    2. Check the Web service check box.
    3. Update the Web service URL suffix.
      The URL suffix must include the base path as defined by the com.WebServiceEngine.RegisterRestService() method in the Web service application, followed by "?openapi.json" or "?openapi.yaml".
  4. Right-click on the configuration node and select Execute.

The Web service application launches. If the GAS was not previously running, it is also started. The Tasks view lists the running service, and a browser opens displaying the OpenAPI description in JSON or YAML format, as specified by the Web service URL suffix.