ksmatthews Posted January 24, 2010 Share Posted January 24, 2010 Hi All, I am running a CLI script written in PHP to execute a remote web service. THe service calls a method 'GetUKLocationByCounty($param)' which returns XML. I keep getting an error when I pass a string to this method, as required. Here is part of the code ... $client = new SoapClient('http://www.webservicex.net /uklocation.asmx?wsdl', array('trace' => 1 )); // call method $response = $client->GetUKLocationByCounty('Cornwall'); // get last soap response echo $client->__getLastResponse(); The web service can be found at : http://www.webservicex.net/WCF/ServiceDetails.aspx?SID=28 RESULT: PHP Fatal error: Uncaught SoapFault exception: [soap:Server] System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Data.SqlClient.SqlException: Procedure or function 'GetUKLocationByCounty' expects parameter '@County', which was not supplied. at WebServicex.UKLocation.GetUKLocationByCounty(String County) --- End of inner exception stack trace --- in /home/steven/public_html/XML-load/soap_test2.php:16 Any ideas ? regards, Steven Matthews Quote Link to comment https://forums.phpfreaks.com/topic/189631-web-services-with-soap/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.