On 10-7-2014 13:16, mcee...@gmail.com wrote:
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);
}
i don't get a 'Invalid ZIP error', when i copy/paste the example from: http://wiki.cdyne.com/index.php/CDYNE_Weather
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 461 |
Nodes: | 16 (2 / 14) |
Uptime: | 50:10:23 |
Calls: | 9,370 |
Calls today: | 1 |
Files: | 13,545 |
Messages: | 6,086,266 |