I have a simple web-service on .Net 3.5 in which there is a method of HelloWorld() as below
[WebMethod(EnableSession=true)]
public string HelloWorld() {
if (Session["Count"] == null) { Session["Count"] = 1; }
Session["Count"] = Convert.ToInt32(Session["Count"]) + 1;
return "Hello World " + Session["Count"];
}
which works in ASP.NET web-browser and IIS and returns output Hello World 1, 2, 3, 4 and soon....
depend on how much page open or refresh.
After some time according to requirement of project i was used SOAPUI tool (for testing of web service).
I create new project in SOAPUI and insert the url of service like
http://www.myservices/service.asmx?wsdl
In SOAPUI there is a method with same name but when i execute it the open every time it creates a new session. means its returns me Hello World 1, 1, 1, 1
at all the time, not maintain Sessions.
However i need to maintain the session for the testing of service.
Thank you.