Finally, got the answer !! We have to use Output parameter , give it as an argument to the called stored procedure and finally just by a type cast we can use the value . ( My return format is JSON but it is equally valid for XML format) Interface : [OperationContract] [WebInvoke(Method = "GET", BodyStyle = WebMessageBodyStyle.Wrapped, ResponseFormat = WebMessageFormat.Json, RequestFormat = WebMessageFormat.Json, UriTemplate = "authenticate/{login}/{pwd}")]
Implementation:
public string authenticate(string login, string pwd)
{
SteelcaseMigrationEntities entities = new SteelcaseMigrationEntities();
System.Data.Objects.ObjectParameter output =
new System.Data.Objects.ObjectParameter("out", typeof(string));
entities.authenticate_android(login, pwd, output);
//Console.Write(output.Value)
string result = (string)output.Value;
return result;
}