Step 5: Restore the session in any 4GL web operation from the W3CEndpointReference record

In any publish 4GL web function, the SOAP engine deserializes the WS-Addressing 1.0 reference parameter headers into the W3CEndpointReference sub-record so that you can retrieve the session from the state variable.

For example:
FUNCTION MyFunction()
  IF EndpointReferenceState.ref.OpaqueID IS NULL THEN
    CALL com.WebServiceEngine.SetFaultString("Invalid session id")
    RETURN
  ELSE
    ... Restore the service session based on the OpaqueID state 
    ... variable from the database
  END IF
  ... Process the operation
END FUNCTION