This is version . It is not the current version, and thus it cannot be edited.
[Back to current version]   [Restore this version]

Here's an idea: Let's define an XML-RPC or SOAP interface to Wiki. I don't exactly know what we could do with it, but at least we could do things like:

  • Automatical notification of page changes (someone would need to write a script that would check the RecentChanges, then email anyone.
  • Combining Wikis in a manner more efficient than InterWiki.

This would save us from actually requiring to implement all sorts of features into JSPWiki itself, and allow people to make their own modular thingies.


I'm thinking of the following interfaces:

  • getRecentChanges( long timestamp ): Get list of changed pages since timestamp.
  • getPage( String pagename, int version ): Get the raw Wiki text of page.
  • getPageText( String pagename, int version ): Get page data rendered as plain text, with most of formatting removed (this should be really good for when you actually send wiki pages via email or something).
  • getPageHTML( String pagename, int version ): Return page in rendered HTML. This is of course required because you can never know how the WikiText should be applied, since it varies from Wiki to Wiki.

I don't know whether writing would be such a good idea. But with these you could get somewhere anyway.


That's a very interesting thought. It allows any outside process to monitor and perform actions based on the current state of the Wiki, but without actually affecting the Wiki.

As specified above, the only way to get a list of pages is getRecentChanges(). It seems a bit limiting to think that all the other process would care about is recently changed files. What about:

  • getAllPages(): Get list of all Wiki pages.
  • getMatchingPages(String query): Get list of all Wiki pages that match the query. Of course, this then begs the question of what matching means. That's kind of annoying.

getMatchingPages() may be overkill. Perhaps these queries would be better implemented with a SOAPProvider, a WikiPageProvider based on SOAP. Then the matching SOAP service can store the files anyway it likes, be notified the instant that a page is stored, and query the page text any silly way it feels like. A SOAPProvider would also get around the limitation that the API specified above requires the interested party to "poll" the WikiEngine periodically. With a SOAPProvider, if you care about every save or read, you can track them yourself.


This was almost too easy. JSPWiki 1.6.6-cvs now supports an XML-RPC interface at URL (note the trailing slash).

The available methods are currently:

  • getRecentChanges( Date timestamp ): Get list of changed pages since timestamp. The result is an array, where each element is a struct:
    • name (string) : Name of the page.
    • date (date) : Date of last modification.
  • getPage( String pagename ): Get the raw Wiki text of page, latest version.
  • getPage( String pagename, int version ): Get the raw Wiki text of page.
  • getPageHTML( String pagename ): Return page in rendered HTML.
  • getPageHTML( String pagename, int version ): Return page in rendered HTML.
  • getAllPages(): Returns a list of all pages. The result is an array of strings.

To try this one out, go download the Apache XML-RPC package from, then type in the following command:

java -cp xmlrpc.jar org.apache.xmlrpc.XmlRpcClient jspwiki.getPage Main

(NB: You can't use the command line to get RecentChanges, you'll have to write a script of your own.)

Please test this and see how it works out.


Add new attachment

Only authorized users are allowed to upload new attachments.
« This particular version was published on 27-Jan-2002 22:29 by