I am trying to call a method of webservice in another application.In which i am trying to return string in a method and alert it's output through another application. in first application, I have a web service named-TestTempService whice have a WebMethod like-
[WebMethod]
public static string ShowResult(out string mimeType)
{
mimeType = "Hello, Its not working!";
return mimeType;
}
next, I am calling it from another application and want to show its output string in alert message in second application via below method.
protected void CallTestTempService()
{
TestTempService.TestTempService objTestTempService = new TestTempService.TestTempService();
objTestTempService.ShowResult();
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "PopupScript", "alert('mimeType')", true);
}
It is throwing an exception
System.Web.Services.Protocols.SoapException: Server did not recognize the value of HTTP Header SOAPAction: http://tempuri.org/ShowResult.
at System.Web.Services.Protocols.Soap11ServerProtocolHelper.RouteRequest() at System.Web.Services.Protocols.SoapServerProtocol.RouteRequest(SoapServerMessage message)