Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Date: Thu, 10 Jul 2014 21:31:14 +0200 From: Luuk User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 Newsgroups: comp.lang.php Subject: Re: Help with Pear Soap Client to weather service References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <29639b-848.ln1@luuk.invalid.lan> Lines: 25 NNTP-Posting-Host: 2001:980:9089:1:55e9:4cfe:4cca:4362 X-Trace: 1405021202 news.xs4all.nl 2868 [2001:980:9089:1:55e9:4cfe:4cca:4362]:48481 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.php:14097 On 10-7-2014 13:16, mceexpert@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