Using System;
Using System.Collections.Generic;
Using System.Data;
Using System.Linq;
Using System.Web;
Using System.Web.Services;
Namespace Lteservices
{
<summary>
Summary description of Handoverservices
</summary>
[WebService (Namespace = "http://tempuri.org/")]
[WebServiceBinding (ConformsTo = wsiprofiles.basicprofile1_1)]
[System.ComponentModel.ToolboxItem (False)]
To allow this Web service to be called from a script using ASP. NET AJAX, uncomment the following line.
[System.Web.Script.Services.ScriptService]
public class HandoverServices:System.Web.Services.WebService
{
[WebMethod]
public string HelloWorld ()
{
Return "Hello World";
}
#region General Methods
[WebMethod (description= "method after the execution of the message", Enablesession=true)]
public string GetMessage ()
{
String message = session["message"] as String;
return message;
}
[WebMethod (description=] writes the message returned after execution of the method to the session ", Enablesession=true)]
public void Setmessage (string key,string message)
{
Set a unique key for the session
Rule: guid+ A string
session["Message"] = "Test webservices use Session";
}
#endregion
}
}
WebServices using session