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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.