Generating files for a GWS server

You can write a Genero Web Services Server application for a Web Service that you have created; see Tutorial: Writing a Server Application.

If you want to make sure your Web Service is compatible with that of a third-party (an accounting application vendor, for example), you can use the fglwsdl tool to obtain the WSDL information that complies with that vendor's standards, and to generate corresponding files that can be used in your GWS Server application.

This example requests the Calculator Web Service information from the specified URL, and the output files will have the base name "ws_calculator".
fglwsdl -s -o ws_calculator http://localhost:8090/Calculator?WSDL

For a server application, fglwsdl generates two files. It is not advised to modify these files:

  • 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.

  • 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 linked into your GWS Server application.