Jump to content

web services with SOAP


ksmatthews

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/189631-web-services-with-soap/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.