Siebel Web Server uses session IDs to track user sessions. Servers can be configured to send session IDs either in cookies or in URLs (form fields or query strings; this is the default configuration).
The example below shows an HTTP response header with a Set-Cookie header for a session ID. Session IDs in cookies are handled automatically by Silk Performer.
HTTP/1.1 200 OK Server: Microsoft-IIS/5.0 Date: Tue, 12 Mar 2002 17:26:01 GMT Content-Language: en Cache-Control: no-cache Content-Type: text/html;charset=windows-1252 Content-Length: 3043 Set-Cookie: _sn=!1.428.556d.3c8e3a29; Version=1; Path=/sales
This example shows a fragment of an HTML frameset with a frame that incorporates a session ID in a URL.
<frameset>
<frame name="_sweclient">
<frame name="_swe" src="http://lab61/sales/start.swe?
SWEFrame=top._swe&SWECount=1&
_sn=!1.6c0.447b.3ceccd1b
&SWECmd=GetCachedFrame">
</frameset>
The Silk Performer Web Recorder generates scripts that accurately handle such session IDs.
This example shows fragments of a recorded script that handles the above session ID using the following techniques:
var
gsSid : string; // !1.6c0.447b.3ceccd1b
// ...
WebParseDataBoundEx(gsSid, sizeof(gsSid), "&_sn=", 1,
"&", WEB_FLAG_IGNORE_WHITE_SPACE);
WebPageLink("replace", "Siebel Sales (#2)", 1, "_sweapp");
WebPageForm("http://lab61/sales/start.swe",
SALES_START_SWE003, "Unnamed page (#2)");
// ...
dclform
SALES_START_SWE003 <ENCODE_CUSTOM> :
"SWERPC" := "1",
"SWECount" := "1",
"_sn" := gsSid,// value: "!1.6c0.447b.3ceccd1b"
"SWEJSXInfo" := "false",
"SWECmd" := "InvokeMethod",
"SWEService" := "SWE Command Manager",
"SWEMethod" := "PrepareGlobalMenu";