Compile and run the client

Run your Genero RESTful Web service client app to display to the Genero Desktop Client (GDC).

In this task we run the client app in direct mode to display to the GDC.

In a production environment you need to deploy Genero Web services on a Genero Application Server (GAS) running behind a Web server such as Apache. Web services configured for the GAS are available once it starts. Client apps can reach the web service from the internet using a URL provided by the GAS. For more information, see Web services server program deployment.

It is assumed you have already started the Genero RESTful Web service server.

Steps

  1. Compile the client app:
    fglcomp mywsclient.4gl
  2. Compile the client app form:
    fglform custform.per
  3. Start the GDC.
    Launch the GDC monitor. For more details for your OS, see the Genero Desktop Client User Guide.
  4. Start the client app.
    Use the fglrun command to execute the Web service client app.

    fglrun mywsclient.42m

    The GDC opens the app in a system window.
    Figure: RESTful Client app run by GDC

    Genero RESTful Web service client app run by GDC
  5. Execute some menu actions to interact with the Web service

    For example, you can edit a customer's details and create new customers. You will see messages returned from requests to the Web service displayed in the info field. When finished, click Exit to close the app.

What to do next:

Having completed the Quick start 1: RESTful server application, Quick start 2: RESTful server application, part 2, and Quick start 3: RESTful client application you have a basic knowledge of working with a Genero RESTful Web service. There are many more features and ways of working with Genero RESTful high level framework to explore.

You might want to read the topics about using the Genero Web Services high-level framework in the Reference section as a next step. Explore topics in the Code a RESTful server application (high-level framework) and Code a RESTful client application (high-level framework) sections to learn more about creating RESTful Web service server and client applications.