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
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