1

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)

Roman Marusyk
  • 23,328
  • 24
  • 73
  • 116
Priya
  • 1,359
  • 6
  • 21
  • 41
  • Did you try searching the web for this exception message? It usually means that your service namespace differs from that in your generated client proxy. Update your service reference. Also, if this is a new service, don't use the deprecated ASMX Web Services, but look into WebAPI or WCF. – CodeCaster Feb 03 '16 at 10:53
  • Yeah, service namespace and reference are correct. i dunno where i missed :( – Priya Feb 03 '16 at 11:03
  • this might help you http://stackoverflow.com/questions/22682970/system-web-services-protocols-soapexception-server-did-not-recognize-the-value – urfusion Feb 03 '16 at 11:41

0 Answers0