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
Title:
Calling AirportWeather with the SOAP Toolkit
Miscellaneous
Thread ID:
00735988
Message ID:
00735988
Views:
89
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
My blog
My consulting page
My home page

Member of the Trim Your Auto-Quote Campaign!
What's another word for thesaurus?
Next
Reply
Map
View

Click here to load this message in the networking platform