r8 - 11 Oct 2006 - 08:28:50 - CrawfordCurrieYou are here: TWiki >  Plugins Web > WebServicesAddOn
Tags:
, create new tag
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:

  1. backend functions are presented consistantly to external programs
  2. external programs can be written in any language.
  3. 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.

Without WebServices?

Have a cron file as follows:
 * * * 03 00 00 /path/to/your/backup-script

Psuedo code for backup-script:

  1. doBackup() # use your imagination

With WebServices?

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.

Without WebServices?

  • You would probably create a separate cgi application that called the backup script

With WebServices?

  • 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

Without WebServices?

With WebServices?

Pros and Cons

Example 3 - Invoking MailIn from a local pop server

Scenario

Without WebServices?

With WebServices?

Pros and Cons

Example 4 - Invoking MailIn from a remote Lotus Notes server

Scenario

Without WebServices?

With WebServices?

Pros and Cons

-- MartinCleaver - 18 Jan 2002

VoodooPadXmlRpcAddOn is a WebServicesAddOn

-- WillNorris - 23 Jan 2004

Topic attachments
I Attachment Action Size Date Who Comment
plpl WebServices.pl manage 1.2 K 19 Jan 2002 - 07:28 MartinCleaver  
Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r8 < r7 < r6 < r5 < r4 | More topic actions
 
Powered by TWiki
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback SourceForge.net Logo