Step 2: Create a stateful web service with state variable as parameter

The Genero Web Service extension provides a new Web service constructor called createStatefulWebService() to perform stateful services. This function works as the stateless constructor, but expects a simple state variable as parameter.

Example

DEFINE serv com.WebService
LET serv = com.WebService.CreateStatefulWebService("StatefulCookieService",
           "http://4js.com/services",ServiceState) 
# Create a stateful service with a simple 4GL variable as state variable