Categories:
.NET (961)
C (387)
C++ (185)
CSS (84)
DBA (8)
General (31)
HTML (48)
Java (641)
JavaScript (220)
JSP (109)
JUnit (31)
MySQL (297)
Networking (10)
Oracle (562)
Perl (48)
Perl (9)
PHP (259)
PL/SQL (140)
RSS (51)
Software QA (28)
SQL Server (5)
Struts (20)
Unix (2)
Windows (3)
XHTML (199)
XML (59)
Other Resources:
How can we maintain State in Webservices
Do webservice have state ?
✍: Guest
Webservices as such do not have any mechanism by which they can maintain state. Webservices can access ASP.NET intrinsic objects like Session, application and so on if they inherit from “WebService” base class.
<%@ Webservice class="TestWebServiceClass" %> Imports System.Web.Services Public class TestWebServiceClass Inherits WebService <WebMethod> Public Sub SetSession(value As String) session("Val") = Value End Sub end class
Above is a sample code which sets as session object called as “val”. TestWebserviceClass is inheriting from WebService to access the session and application objects.
2007-10-23, 4900👍, 0💬
Popular Posts:
What is the difference between Authentication and authorization? This can be a tricky question. Thes...
Can event’s have access modifiers ? Event’s are always public as they are meant to serve every one r...
How To Process Query Result in PL/SQL? - Oracle DBA FAQ - Introduction to PL/SQL You can run queries...
How To Add Column Headers to a Table? - XHTML 1.0 Tutorials - Understanding Tables and Table Cells I...
What is PMP(project management plan)? The project management plan is a document that describes the p...