Stateful services based on HTTP cookies / Server side |
In any publish 4GL web function, the SOAP engine deserializes the HTTP Cookie called GSESSIONID from the HTTP layer into the state variable. You can then retrieve the session in 4GL via that state variable.
FUNCTION MyFunction() IF ServiceState IS NULL THEN CALL com.WebServiceEngine.SetFaultString("Invalid session id") RETURN ELSE ... Restore the service session based on the ServiceState variable from the database END IF ... Process the operation END FUNCTION