Generating globals file for GWS server

Use the fglwsdl -legacy tool option to generate legacy code (Genero 3.20 or prior) for the server stub from a WSDL.

This command gets the WSDL information for the Calculator Service defined in Example 1: Writing the entire server application using the -legacy option of the fglwsdl tool. This allows you to generate a globals file and a stub file.
fglwsdl -s -legacy -soap12 -o ws_calculator http://localhost:8090/Calculator?WSDL

The -s option specifies the command generates server stubs to be used in a GWS server application. It generates two files, adding "Service" to the file names generated:

  • filename.inc - the globals file, containing declarations of global variables that can be used as input or output to functions accessing the Web Service operations. In our example, the file is ws_calculatorService.inc.
    This file must be listed in a GLOBALS statement at the top of any .4gl modules that you write for your GWS Server application. For example:
    GLOBALS "ws_calculatorService.inc"
  • filename.4gl - containing a function that creates the service described in the WSDL, publishes the operations of the service, and registers the service. In our example, the file is ws_calculatorService.4gl.

    This file must be compiled and imported into your GWS Server application.

It is not advised to modify these files.