tpiazza55 Posted April 19, 2007 Share Posted April 19, 2007 I am trying to make a php page call a .NET web service and return a value. Running into all kinds of problems I made an .NET web app that calls the web service no problem php code below / error below that <?php require_once('lib/nusoap.php'); $client = new soapclient("http://localhost/phptestservice/service.asmx"); $err = $client->getError(); if ($err) { // Display the error echo $err ; } else { $answer = $client->call("hello"); $err = $client->getError(); if ($err) { // Display the error echo $err; print_r($client->response); } else { print_r($answer); } } ?> error message soap:Client: System.Web.Services.Protocols.SoapException: Server did not recognize the value of HTTP Header SOAPAction: . at System.Web.Services.Protocols.Soap11ServerProtocolHelper.RouteRequest() at System.Web.Services.Protocols.SoapServerProtocol.RouteRequest(SoapServerMessage message) at System.Web.Services.Protocols.SoapServerProtocol.Initialize() at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing)HTTP/1.1 500 Internal Server Error Server: Microsoft-IIS/5.1 Date: Thu, 19 Apr 2007 17:46:15 GMT MicrosoftOfficeWebServer: 5.0_Pub X-Powered-By: ASP.NET X-AspNet-Version: 2.0.50727 Cache-Control: private Content-Type: text/xml; charset=utf-8 Content-Length: 866 soap:ClientSystem.Web.Services.Protocols.SoapException: Server did not recognize the value of HTTP Header SOAPAction: . at System.Web.Services.Protocols.Soap11ServerProtocolHelper.RouteRequest() at System.Web.Services.Protocols.SoapServerProtocol.RouteRequest(SoapServerMessage message) at System.Web.Services.Protocols.SoapServerProtocol.Initialize() at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing) Link to comment https://forums.phpfreaks.com/topic/47774-solved-call-a-net-service-from-php/ Share on other sites More sharing options...
tpiazza55 Posted April 19, 2007 Author Share Posted April 19, 2007 <?php require_once('lib/nusoap.php'); $client = new soapclient('http://localhost/phptestservice2/service.asmx?wsdl','wsdl'); $client->debug_flag = true; $result = $client->call('hello'); echo "The message is: "; print_r($result); ?> Link to comment https://forums.phpfreaks.com/topic/47774-solved-call-a-net-service-from-php/#findComment-233431 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.