Multi-tiered services (keeping sessions straight)

T

Thor Johnson

Question summary:
How can I make sure I use the same session when I call a webservice?

Question details:
Right now, I have 3 web services that play with each other (well... they don't work yet;):

[Top-Tier]
CommObject - This must be a webservice. It locates the appropriate CommDevice and makes requests.
The corporate ASP pages use this Webservice to display values.

[Middle-Tier]
CommDevice - This tier takes requests, and handles the protocol implementation. These objects
may/may not use the XMLGw to find the communication endpoint.
CommDeviceA - This implements the comm channel for device A's
CommDeviceB - This implements the comm channel for device B's

[Bottom-Tier]
XMLGw - This is a XML Gateway locater; the CommDevice objects use it to find the
correct external object to communicate with.


Right now, all three tiers are implemented as webservices so, for example, the CommObject
can use a database+UDDI to find an eligable CommDevice.

Each tier has data that needs to persist across function calls, so I store it in the session
object.

The problem:
A typical execution scenario is:
1 CommObject:FindCommDevice
2 CommObject:ConnectToA, which does
2a CommObject->CommDeviceA->XMLGw:Locate
2b CommObject->CommDeviceA:Connect
3 CommObject:ListValues, which does
3a CommObject->CommDeviceA->XMLGw:ListValues

Unfortunately, the SessionID in step 2a and 3a are different, even though the sessionID's
in steps 2 and 3 (at the CommDeviceA level) are the same. How can I store and reuse the
SessionID for the CommDeviceA->XMLgw calls?

Alternatively,
I suppose the CommDevice->XMLgw layer doesn't have to be a WebService... what would be the
best way "combining" the projects so you can step through each layer in Visual Studio?
(I tried just "adding" the XMLgw webservice project to the CommDeviceA Solution, but
I got runtime errors that I couldn't debug "Couldn't Create CommDeviceA.CommDeviceA")


TIA,
Thor Johnson
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top