Help with Pear Soap Client to weather service [message #186373] |
Thu, 10 July 2014 11:16  |
mceexpert
Messages: 3 Registered: July 2014
Karma: 0
|
Junior Member |
|
|
Hello,
I am trying to do a simple soap call to a weather service and I keep getting Invalid ZIP error. Can someone tell me what I am doing wrong below is my code.
Thanks
require_once 'SOAP/Client.php';
$client = new Soap_Client('http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL');
$method = 'GetCityWeatherByZIP';
$params = array('ZIP' => '07108');
$result = $client->call($method, $params);
if (PEAR::isError($result)) {
echo $result->getMessage();
} else {
print_r($result);
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|