Wiki Home

Wiki Web Services VFPSample Code


Namespace: VFP
Some Samples of Wiki Web Services

I had to replace the below line with
xx = loWS.SetupClient("http://fox.wikis.com/WikiWebService.WSDL","wikiwebservice", "wikiwebservice"+"Soap"+"Port")
to make the sample work. Not being experienced with the Soap Toolkit nor XML I'll make no assumptions but share what "I" had to do to make this work.

--->The Kid<---
Run this sample and you'll be left with 5 open cursors, each with the contents of what you request.
Note: If you're using VFP, this is only useful if you've upgraded to VFP 7.

In VFP 7, register http://fox.wikis.com/wikiwebservice.wsdl in the Intellisense Manager (Under Tools - Intellisense Manager - Types tab - Web Services button) as "Web Service -- Fox Wiki" and then run the following code.
* WikiWSSample.PRG
*-- Thanks to Cristof Lange and Rick Borup for some enlightened debugging
*-- Create some quick sample cursors 
*-- Note: After you register http://fox.wikis.com/wikiwebservice.wsdl, Foxpro's intellisense 
*-- will write what's below in purple.
LOCAL xx as Web Service -- Fox Wiki  && <<-- Adjust to suit, intellisense will fill this line in for you.
LOCAL loWS
loWS = NEWOBJECT("Wsclient",HOME()+"ffc\_webservices.vcx")
loWS.cWSName = "Web Service -- Fox Wiki"
xx = loWS.SetupClient("http://fox.wikis.com/WikiWebService.WSDL", "wikiwebservice", "Application"+"Soap"+"Port")

*-- 5 days recent changes 
yy=xx.GetRecentChanges(5,"")
XMLTOCURSOR(yy,"Last5DaysRecentChanges")
BROWSE NORMAL NOWAIT
 
*-- 5 days recent changes, topics containing the string "StevenBlack"
yy=xx.GetRecentChanges(5,"StevenBlack")
XMLTOCURSOR(yy,"Last5DaysRecentChangesContaingStevenBlack")
BROWSE NORMAL NOWAIT
 
*-- All topics containing Delphi
yy=xx.GetTextSearch("Delphi")
XMLTOCURSOR(yy,"TopicsContainingDelphi")
BROWSE NORMAL NOWAIT
 
*-- Return the KenLevy topic as raw wiki text, exactly as it would appear in the Wiki edit window.
yy=xx.GetTopicText("KenLevy")
XMLTOCURSOR(yy,"KenLevyTopicAsRawWikiText")
BROWSE NORMAL NOWAIT
 
*-- Return the KenLevy as HTML, with fully qualified links, that you can insert in another website, for example.
yy=xx.GetTopicHTML("KenLevy")
XMLTOCURSOR(yy,"KenLevyTopicAsHTML")
BROWSE NORMAL NOWAIT

Category Web Services Category Code Samples
( Topic last updated: 2003.08.19 06:56:59 AM )