Obsolete topic. See the standard REST interface in TWiki instead if you want to do this sort of thing.
Needed for
MailInAddOn
Part implements
TWikiAsWebServicesServer.
NB This topic is not yet stable.
Motivation
As TWiki gets more mature, there is an increasing need to interact with it programmatically.
Some functions that we may wish to access programmatically include:
- adding content to a TWiki page
- creating a web
- performing a backup
- initiating mailnotify
Webservices provides a means to standardise any back end interactions so that:
- backend functions are presented consistantly to external programs
- external programs can be written in any language.
- standard external mechanisms can be used.
The
WebServicesAddOn is, at present, simply a hook to allow webservices clients to enquire what functions and invoke
Examples
Example 1 - Initiating backup from a local OS timer
Scenario
You want to initiate a backup every night.
Have a cron file as follows:
* * * 03 00 00 /path/to/your/backup-script
Psuedo code for backup-script:
- doBackup() # use your imagination
Have a cron file as follows:
* * * 03 00 00 soap-call http://yourserver/webservices.pl BACKUP
entry added to webservices.pl:
sub Backup {
TWiki::Backup::doBackup()
}
code for TWiki::Backup:
package TWiki::Backup;
sub doBackup { .... code as before }
Pros and Cons
- Without WebServices, starting the backup job requires knowledge of the location of the script
Example 2 - Initiating backup from a remote web page
Scenario
- You have a centralised operations team who require all tasks to be initiatable through the web.
- You would probably create a separate cgi application that called the backup script
- Code already written, see example 1
Pros and Cons
Example 5 - Using a WebServices Client to initiate backup
Scenario
- You want to do testing of your backup procedures or
Pros and Cons
Example 3 - Invoking MailIn from a local pop server
Scenario
Pros and Cons
Example 4 - Invoking MailIn from a remote Lotus Notes server
Scenario
Pros and Cons
--
MartinCleaver - 18 Jan 2002
VoodooPadXmlRpcAddOn is a
WebServicesAddOn
--
WillNorris - 23 Jan 2004