Wait for an HTTP input request to process an operation of one of the registered SOAP or REST Web Services.


   timeout INTEGER )
  1. timeout defines the timeout in seconds.


The com.WebServiceEngine.ProcessServices() method processes requests made by client apps for operations of a SOAP or REST Web Service registered by the Genero Web Service engine. Typically, you call the method inside a WHILE loop to process the various requests and control the workflow for all requests made by clients. As long as the int_flag variable is FALSE or the execution status is valid, the condition within the loop remains TRUE and requests are executed. For a complete example of Web service execution and status handling, see Process the requests.

The timeout parameter defines the wait period (in seconds) the method may wait to process a request. The value -1 specifies an infinite waiting time.

The status returned by the method provides information about the execution of the last web operation. A return status of zero means OK. For a complete list of error codes, see Error codes of com.WebServicesEngine

A status of -8 or -10 is returned if an invalid or unsupported HTTP request is sent.

Even if the exception is trapped, the GWS HTTP server is not in a valid state anymore, and you must close the application properly before exiting the program.

This is not an issue in production environments as the Genero Application Server (GAS) and GWSProxy will detect the ended DVM, return an HTTP error code to the client app, and any new request will start a new DVM in a clean state via GWS proxy and the pool configuration.

The execution status is typically handled in a CASE / END CASE block, to treat all possible execution cases.


If the com.WebServiceEngine.Flush() method is used, the return status handling must be done in the web operation function, while com.WebServiceEngine.ProcessServices() will return the code -31, to indicated that a flush was done.