02-08-04 01:45 PM
Session information, namely the session ID, is sent from the server as part
of the HTTP headers of the response it sends to the client.
You need to parse the response the client gets, to find the Session ID.
When you send a request in ACT to a web server, you do so in a form similar
to:
Set oResponse = oConnection.Send(oRequest)
the oResponse object, is an object which contains the response issued by
the web server, including the Body of the response (HTML
code)(oResponse.Body), the Content length (oResponse.ContentLength), the
HTTP response code (200 OK, 400, 500, etc;) (oResponse.ResultCode), and the
Headers (oResponse.Headers).
The headers are a collection of headers in the response. I recommend you
parse through these to look for your session ID.
To figure out exactly what the headers look like, you could parse the
oResponse.Headers object to see what the server is sending back, and then
altering your code to handle it. A sample function of how to do this, is
in the help documentation, and I am pasting it here:
''''''''''''''''''''''''''''''''''''''''
''''''''''
' Procedure to display the properties of each
' Header object in the Headers collection.
'
Sub ShowHeadersProperties(oResponse)
Dim oHeader, oHeaders, lCount, strInfo
Set oHeaders = oResponse.Headers
strInfo = "-- Headers info --" & vbCrLf
For Each oHeader In oHeaders
strInfo = strInfo & oHeader.Name & ": " & oHeader.Value & vbCrLf
Next
Call Test.Trace(strInfo)
Call Test.Trace("(Total: " & CStr(oHeaders.Count) & _
" header fields)")
End Sub
I am guessing you will eventually want to send the session ID back to the
server, which means you must place it in... yes, you guessed it, in the
header of the follow-up request you send to the server!
Does this answer your question? Thank you for using Microsoft Newsgroups!
Andrés Naranjo [MSFT]
Microsoft DS Communities Team
This posting is provided "AS IS" with no warranties, and confers no rights.
Please reply to newsgroups only.
[ Post a follow-up to this message ]
|