Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #14086 > unrolled thread

Help with Pear Soap Client to weather service

Started bymceexpert@gmail.com
First post2014-07-10 04:16 -0700
Last post2022-10-30 11:08 -0700
Articles 13 — 7 participants

Back to article view | Back to comp.lang.php


Contents

  Help with Pear Soap Client to weather service mceexpert@gmail.com - 2014-07-10 04:16 -0700
    Re: Help with Pear Soap Client to weather service Jerry Stuckle <jstucklex@attglobal.net> - 2014-07-10 08:45 -0400
      Re: Help with Pear Soap Client to weather service mceexpert@gmail.com - 2014-07-10 06:40 -0700
        Re: Help with Pear Soap Client to weather service Christoph Michael Becker <cmbecker69@arcor.de> - 2014-07-10 16:00 +0200
        Re: Help with Pear Soap Client to weather service Jerry Stuckle <jstucklex@attglobal.net> - 2014-07-10 10:33 -0400
        Re: Help with Pear Soap Client to weather service Doug Miller <doug_at_milmac_dot_com@example.com> - 2014-07-10 18:28 +0000
    Re: Help with Pear Soap Client to weather service Doug Miller <doug_at_milmac_dot_com@example.com> - 2014-07-10 18:35 +0000
      Re: Help with Pear Soap Client to weather service Doug Miller <doug_at_milmac_dot_com@example.com> - 2014-07-10 18:47 +0000
        Re: Help with Pear Soap Client to weather service mceexpert@gmail.com - 2014-07-10 12:31 -0700
          Re: Help with Pear Soap Client to weather service Jerry Stuckle <jstucklex@attglobal.net> - 2014-07-10 19:30 -0400
          Re: Help with Pear Soap Client to weather service bill <william@TechServSys.com> - 2014-07-11 07:25 -0400
    Re: Help with Pear Soap Client to weather service Luuk <luuk@invalid.lan> - 2014-07-10 21:31 +0200
      Re: Help with Pear Soap Client to weather service Kommunikatsioonitehnoloogia valmistaja <vvvvvvvvvvvvvvvvvvvvvvvvv1@hotmail.com> - 2022-10-30 11:08 -0700

#14086 — Help with Pear Soap Client to weather service

Frommceexpert@gmail.com
Date2014-07-10 04:16 -0700
SubjectHelp with Pear Soap Client to weather service
Message-ID<bb68260a-cb54-4763-8fe6-dde47f1ae42a@googlegroups.com>
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);
}

[toc] | [next] | [standalone]


#14087

FromJerry Stuckle <jstucklex@attglobal.net>
Date2014-07-10 08:45 -0400
Message-ID<lpm1u6$p0s$1@dont-email.me>
In reply to#14086
On 7/10/2014 7:16 AM, 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);
> }
> 

Did you ask cdyne?  They know their APIs better than anyone else.


-- 
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#14089

Frommceexpert@gmail.com
Date2014-07-10 06:40 -0700
Message-ID<da408cbc-5d59-473b-8284-064c8dc90b8e@googlegroups.com>
In reply to#14087
> On Thursday, July 10, 2014 8:45:57 AM UTC-4, Jerry Stuckle wrote:
> Did you ask cdyne?  They know their APIs better than anyone else.
> 
> 
> 
> 
> 
> -- 
> 
> ==================
> 
> Remove the "x" from my email address
> 
> Jerry Stuckle
> 
> jstucklex@attglobal.net
> 
> ==================

There is no problem with cdyne webservice because it works from my desktop app.

[toc] | [prev] | [next] | [standalone]


#14091

FromChristoph Michael Becker <cmbecker69@arcor.de>
Date2014-07-10 16:00 +0200
Message-ID<53be9c6a$0$6671$9b4e6d93@newsspool3.arcor-online.net>
In reply to#14089
Am 10.07.2014 15:40, schrieb mceexpert@gmail.com:

> There is no problem with cdyne webservice because it works from my
> desktop app.

Well, the summary on <http://pear.php.net/package/SOAP/redirected> says:

| **Use PHP's in-built SOAP client!**

They may have good reasons to recommend that. :)

Please avoid the broken Google Groups when posting to Usenet.

-- 
Christoph M. Becker

[toc] | [prev] | [next] | [standalone]


#14092

FromJerry Stuckle <jstucklex@attglobal.net>
Date2014-07-10 10:33 -0400
Message-ID<lpm870$3gt$1@dont-email.me>
In reply to#14089
On 7/10/2014 9:40 AM, mceexpert@gmail.com wrote:
>> On Thursday, July 10, 2014 8:45:57 AM UTC-4, Jerry Stuckle wrote:
>> Did you ask cdyne?  They know their APIs better than anyone else.
>>
> 
> There is no problem with cdyne webservice because it works from my desktop app.
> 

I didn't say there was a problem with their web service.  I asked if you
asked THEM for help with THEIR APIs.

Also, please learn to trim appropriately - or better yet, get a real
usenet reader.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#14093

FromDoug Miller <doug_at_milmac_dot_com@example.com>
Date2014-07-10 18:28 +0000
Message-ID<XnsA36693331378Bdougmilmaccom@78.46.70.116>
In reply to#14089
mceexpert@gmail.com wrote in news:da408cbc-5d59-473b-8284-
064c8dc90b8e@googlegroups.com:

>> On Thursday, July 10, 2014 8:45:57 AM UTC-4, Jerry Stuckle wrote:
>> Did you ask cdyne?  They know their APIs better than anyone else.
>> 
> There is no problem with cdyne webservice because it works from my desktop app.

Who suggested there *was* a problem with cdyne webservice? The point is that if you're 
having trouble using their API, you should ask them for help with it.

[toc] | [prev] | [next] | [standalone]


#14094

FromDoug Miller <doug_at_milmac_dot_com@example.com>
Date2014-07-10 18:35 +0000
Message-ID<XnsA366945EB2C55dougmilmaccom@78.46.70.116>
In reply to#14086
mceexpert@gmail.com wrote in
news:bb68260a-cb54-4763-8fe6-dde47f1ae42a@googlegroups.com: 

> 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. 
> 
[...]
> $method = 'GetCityWeatherByZIP'; 
> $params = array('ZIP' => '07108');  
> $result = $client->call($method, $params);

Four obvious possible explanations for the error message you're seeing:
1) an associative array is not the correct structure to use for passing this parameter
2) 'ZIP' is the wrong name
3) a five-character string is not the expected format for the zip code data
4) 07108 is not a valid zip code

What have you done to eliminate each of these as a possible cause of the problem?

[toc] | [prev] | [next] | [standalone]


#14095

FromDoug Miller <doug_at_milmac_dot_com@example.com>
Date2014-07-10 18:47 +0000
Message-ID<XnsA3669653224E5dougmilmaccom@78.46.70.116>
In reply to#14094
Doug Miller <doug_at_milmac_dot_com@example.com> wrote in 
news:XnsA366945EB2C55dougmilmaccom@78.46.70.116:

> mceexpert@gmail.com wrote in
> news:bb68260a-cb54-4763-8fe6-dde47f1ae42a@googlegroups.com: 
> 
>> 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. 
>> 
> [...]
>> $method = 'GetCityWeatherByZIP'; 
>> $params = array('ZIP' => '07108');  
>> $result = $client->call($method, $params);
> 
> Four obvious possible explanations for the error message you're seeing:
> 1) an associative array is not the correct structure to use for passing this parameter
> 2) 'ZIP' is the wrong name
> 3) a five-character string is not the expected format for the zip code data
> 4) 07108 is not a valid zip code

Let me add a fifth obvious possible explanation:
5) everything you have is correct, but it's incomplete: some required label/value pair is 
missing, such as a userID or password
> 
> What have you done to eliminate each of these as a possible cause of the problem?
> 

[toc] | [prev] | [next] | [standalone]


#14096

Frommceexpert@gmail.com
Date2014-07-10 12:31 -0700
Message-ID<2d24a8a4-7e2a-4173-aa7d-1791306f2078@googlegroups.com>
In reply to#14095
I appreciate the responses and I was able to get the web service to work with Microsoft.Net and the built-in PHP SoapClient on my local server. I am not familar with Pear but unfortunately my client hosting company does not support the built-in PHP SoapClient. From my research the code I created should work. Also 07108 is a valid zip code.

Thanks

[toc] | [prev] | [next] | [standalone]


#14098

FromJerry Stuckle <jstucklex@attglobal.net>
Date2014-07-10 19:30 -0400
Message-ID<lpn7lo$22a$1@dont-email.me>
In reply to#14096
On 7/10/2014 3:31 PM, mceexpert@gmail.com wrote:
> I appreciate the responses and I was able to get the web service to work with Microsoft.Net and the built-in PHP SoapClient on my local server. I am not familar with Pear but unfortunately my client hosting company does not support the built-in PHP SoapClient. From my research the code I created should work. Also 07108 is a valid zip code.
> 
> Thanks
> 

In that case you need a new hosting company.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#14099

Frombill <william@TechServSys.com>
Date2014-07-11 07:25 -0400
Message-ID<lpohj3$cbj$2@speranza.aioe.org>
In reply to#14096
On 7/10/2014 3:31 PM, mceexpert@gmail.com wrote:
> I appreciate the responses and I was able to get the web service to work with Microsoft.Net

and the built-in PHP SoapClient on my local server.

I am not familar with Pear but unfortunately my client hosting 
company does not

support the built-in PHP SoapClient. From my research the code I 
created should work.

Also 07108 is a valid zip code.
>
> Thanks
>
They suggest you contact them if you are having a problem:
http://www.cdyne.com/company/contact.aspx

[toc] | [prev] | [next] | [standalone]


#14097

FromLuuk <luuk@invalid.lan>
Date2014-07-10 21:31 +0200
Message-ID<29639b-848.ln1@luuk.invalid.lan>
In reply to#14086
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

[toc] | [prev] | [next] | [standalone]


#19150

FromKommunikatsioonitehnoloogia valmistaja <vvvvvvvvvvvvvvvvvvvvvvvvv1@hotmail.com>
Date2022-10-30 11:08 -0700
Message-ID<bb2f1ecf-36c5-4ea7-874f-3d1b87c96dd4n@googlegroups.com>
In reply to#14097
Hello

Want to listen something good ?

↓
https://youtu.be/HEVPKuxkWzA?list=RDMM
↑


Luuk kirjutas Neljapäev, 10. juuli 2014 kl 22:31:14 UTC+3:
> 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

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.php


csiph-web