Tags:
create new tag
view all tags
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 History Action Size Date Who Comment
Perl source code filepl WebServices.pl r1 manage 1.2 K 2002-01-19 - 07:28 UnknownUser  
Edit | Attach | Watch | Print version | History: r8 < r7 < r6 < r5 < r4 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r8 - 2006-10-11 - CrawfordCurrie
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.