title: Calling an ASP.Net web service using php
body: <p>I'm trying to consume an ASP.Net web service using a php client. The php method recieves one double parameter and returns a value based on it.</p>
  
  <p>This is my client.php code:</p>
  
  <pre><code>$wsdl_url = "url";
  $client = new SoapClient($wsdl_url);
  $params = array('value'=&gt;200);
  $response  = $client-&gt;kilogramsToPounds($params);
  echo "&lt;pre&gt;";
  var_dump($response);
  echo "&lt;/pre&gt;";
  echo "$response-&gt;kilogramsToPoundsResult";
  </code></pre>
  
  <p>When I run the code I get the following error:</p>
  
  <pre><code>Fatal error: Uncaught SoapFault exception: [Client] SOAP-ERROR: Encoding: object has no 'kilograms' property in /var/www/student/oce1bct/CourseWork/Scenario3/TestFolder/convertersTest.php:23 Stack trace: #0 /var/www/student/oce1bct/CourseWork/Scenario3/TestFolder/convertersTest.php(23): SoapClient-&gt;__call('kilogramsToPoun...', Array) #1 /var/www/student/oce1bct/CourseWork/Scenario3/TestFolder/convertersTest.php(23): SoapClient-&gt;kilogramsToPounds(Array) #2 {main} thrown in /var/www/student/oce1bct/CourseWork/Scenario3/TestFolder/convertersTest.php on line 23 
  </code></pre>
  
  <p>The excerpt from the web service to be consumed is also below</p>
  
  <pre><code>[WebMethod]
  
  public double kilogramsToPounds(double kilograms)
  
  {
  
  double pounds = 0;
  
  pounds = kilograms * 2.204;
  
  return pounds;
  
  }
  </code></pre>
  
  <p>I am 90% certain that I am not passing the values to the web service call correctly but have been unable to rectify the problem.
  Any help would be appreciated.
  Thanks.</p>