Step 1: Generate the client stub from your stateful service

Use the fglwsdl tool as usual.

For example:
$ fglwsdl -o ws_stub http://localhost:8090/StatefulCookieService?WSDL

The generated .inc file contains a variable of type tGlobalEndpointType to be used to transmit the HTTP Cookie.

Example of a global variable name

DEFINE StatefulCookieService_StatefulCookieServicePortTypeEndpoint
 tGlobalEndpointType