Step 3: Publish a web service operation defined as session initiator

Define which web service operation will initiate the session on your service and instantiate a new session. All other web service operations (not defined as session initiator) will return an error if they don't get an HTTP cookie called GSESSIONID.

For example:
DEFINE op com.WebOperation
LET op = com.WebOperation.CreateDocStyle("GetInstance","GetInstance",NULL,NULL)
CALL op.initiateSession(true)
CALL serv.publishOperation(op,NULL)

There is no restriction on the web service session initiator function regarding to the input and output parameters.