Maintaining session for Web Services between SOAP requests
-
Hi All I am sending a receiving data using SOAP Envelope. Now i want to maintain session between my SOAP requests. How to maintain session for Web Services between SOAP requests? Thanks Sumit Domyan
-
Hi All I am sending a receiving data using SOAP Envelope. Now i want to maintain session between my SOAP requests. How to maintain session for Web Services between SOAP requests? Thanks Sumit Domyan
Check out this documentation page[^] on MSDN. It deals with enabling ASP.NET Session state to a web service. ~Javier Lozano
-
Check out this documentation page[^] on MSDN. It deals with enabling ASP.NET Session state to a web service. ~Javier Lozano
I am also trying to implement it using SOAP Header, but not getting success. Might be i am not sending the proper SOAP Header. My SOAP Envelope looks like
<soap:Envelope xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
soap:Header
<BeginSession xmlns="http://analec.com/TestWebService/MyService" mustUnderstand="1"></BeginSession>
wsa:Actionhttp://analec.com/TestWebService/MyService/IncrementSessionCounterX</wsa:Action>
wsa:MessageIDuuid:42816f56-d9e5-4dfc-8606-7fd788338d31</wsa:MessageID>
wsa:ReplyTo
wsa:Addresshttp://schemas.xmlsoap.org/ws/2004/03/addressing/role/anonymous</wsa:Address>
</wsa:ReplyTo>
wsa:Tohttp://localhost/TestWebService/MyService.asmx</wsa:To>
wsse:Security
<wsu:Timestamp wsu:Id="Timestamp-4378beed-f9ec-4cb3-982d-490dabd47f36">
wsu:Created2005-06-21T12:55:14Z</wsu:Created>
wsu:Expires2005-06-21T13:00:14Z</wsu:Expires>
</wsu:Timestamp>
</wsse:Security>
</soap:Header>
soap:Body
<IncrementSessionCounterX xmlns="http://analec.com/TestWebService/MyService"></IncrementSessionCounterX>
</soap:Body>
</soap:Envelope>Everything is working fine, i am getting the response envelope back, but there is no header in the response envelope. Is there anything wrong with SOAP Header? Thanks Sumit