Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Real time weather on a form
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
01211915
Message ID:
01222216
Vues:
18
I'm afraid that is not the case, I ran it in another computer without
registering the service and it works fine. Try this, go the Task Pane;
Tools-->Task Pane, click on XML Web Services and then click on
Register an XML Web Service, is going to ask you to enter the URL,
use the link for the service http://www.webservicemart.com/uszip.asmx?wsdl
And if the task pane is successfull then you try in code, using
the task pane code.

Good luck.


>Hi again. I too use VFP 8.0. When I pause to print out loNotification, it says just 'Object'. leRtnVal says 'null'. I did not register the web service as I've never attempt this before, probably this is causing the errors?
>
>
>
>>Hi Timothy, Yes it is suppose to work as it is, I copy the code from this message in my computer running VFP8 and it ran without a problem, see
>>if in the code when you type "loNotification." opens the intellisense, it should. What version of Fox are you using?, What version of the SOAP client?
>> Let me know.
>>
>> Good Luck.
>>
>>
>>>Thanks for reply. I ran your code as is, was it supposed to work as is? I am not sure going about registering a web service. The error message I get is:
>>>
>>>OLE IDispatch exception code 0 from Client:
>>>Client:An unanticipated error occurred during the
>>>processing of this request. HRESULT=0x800A13BE
>>>- Client:Sending the Soap message failed or no
>>>recognizable response was received
>>>HRESULT=0x800A13BE - Client:Unspecfied client error
>>>
>>>
>>>>Hi Timothy, I'm sorry for the delay, the setup is pretty straightfoward
>>>>in most situations, here an example of a webservice that gives you
>>>>the location for a specific ZipCode; (could not find any free one
>>>>that would work that gives you weather); register the web service
>>>>in the Task Pane in Fox and that will let you see the methods available
>>>>from the service, in this case there is only one. If you can not find
>>>>a weather web service at least you can use ShellExecute to navigate to
>>>>a page; let's say MSNBC.COM, dump the page to a text file and read it from there.
>>>>
>>>>Good luck.
>>>>
>>>>LOCAL loNotification AS "MSSOAP.SoapClient30"
>>>>* Do not remove or alter following line. It is used to support IntelliSense for your XML Web service.
>>>>*__VFPWSDef__: lonotification = http://www.webservicemart.com/uszip.asmx?wsdl notification , notificationSoap
>>>>
>>>>lcZip = "33029"
>>>>loNotification = CREATEOBJECT("MSSOAP.SoapClient30")
>>>>
>>>>leRtnVal = loNotification.MSSoapInit("http://www.webservicemart.com/uszip.asmx?wsdl")
>>>>
>>>>
>>>>leResult = loNotification.ValidateZip(lcZip)
>>>>
>>>>XMLTOCURSOR(leResult,'ZIP')
>>>>
>>>>SELECT ZIP
>>>>BROWSE
>>>>
>>>>
>>>>
>>>>>I guess calling the web service is what I'm after, the how to. Does this require alot of setup?
>>>>>
>>>>>
>>>>>>Hi Timothy, I think the easiest way is to call a Web Service,
>>>>>>try
>>>>>>http://www.ejse.com/WeatherService/Service.asmx
>>>>>>or
>>>>>>http://wsfinder.jot.com/WikiHome
>>>>>>
>>>>>>Also, you can try to scrape it from msnbc, google, etc...
>>>>>>
>>>>>>Good luck
>>>>>>
>>>>>>
>>>>>>>Can someone point me to the way to have a control like a label display time/weather from an internet connection? I assume it involves a com server web connection? Thanks
Luis Guzman, MCP
"The only glory most of us have to hope for
is the glory of being normal." Katherine Fulleton Gerould
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform