Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calling AirportWeather with the SOAP Toolkit
Message
General information
Forum:
Visual FoxPro
Category:
Web Services
Miscellaneous
Thread ID:
00735988
Message ID:
00736352
Views:
25
Thanks for the web service code. It works fine for me.

For anyone else wanting to use the program, you can substitute a nearby airport code for KPVD in Garrett's program below. For example, San Francisco airport is about a mile from me. The airline code (so called IATA) on your flight ticket is SFO. The 'station' - (so called ICAO) is KSFO. Los Angeles = KLAX, Las Vegas = KLAS, etc. You can probably find your airport info here: http://www.ar-group.com/icaoiata.htm

>I've been trying to figure out how to use the SOAP toolkit recently, with mixed results. I just wanted to post the following code for the benefit of anyone else who's feeling clueless. It doesn't do much, but it might help you figure out how to get started.
>
>Between the link in the first line, and the Intellisense, you should be able to get the gist of what's going on. See MSKB#307355 HOW TO: Call a Web Service in Visual FoxPro 7.0 for a higher-level method of doing this.
>
>
*!* http://www.capescience.net/webservices/airportweather/index.shtml
>
>LOCAL loConn as MSSoap.HttpConnector, ;
>      loSerializer as MSSoap.SoapSerializer, ;
>      loReader as MSSoap.SoapReader
>	
>loConn = CREATEOBJECT("MSSoap.HttpConnector")
>loSerializer = CREATEOBJECT("MSSoap.SoapSerializer")
>loReader = CREATEOBJECT("MSSoap.SoapReader")
>
>loConn.Property("EndPointURL") = "http://live.capescience.com/ccx/AirportWeather"
>loConn.Connect()
>loConn.BeginMessage()
>   loSerializer.Init(loConn.InputStream)
>   loSerializer.startEnvelope()
>      loSerializer.startBody
>         loSerializer.startElement("getTemperature", ;
>               "capeconnect:AirportWeather:com.capeclear.weatherstation.Station", ;
>               "NONE")
>            loSerializer.startElement("arg0")
>               loSerializer.writeString("KPVD")
>            loSerializer.endElement()
>         loSerializer.endElement()
>      loSerializer.endBody()
>   loSerializer.endEnvelope()
>loConn.endMessage()
>
>IF loReader.Load(loConn.OutputStream)
>   ? "-----------------------------"
>   ? loReader.DOM.xml
>   ? "Or: -------------------------"
>   ? loReader.DOM.text
>   ? "-----------------------------"
>ELSE
>   ? "Could not read results"
>ENDif
Dr. Ken A. McGinnis
Healthcare software design
Previous
Reply
Map
View

Click here to load this message in the networking platform