#!perl.exe # save this file as bin/WebServices.pl # # This WebServices file provides a common gateway # webservices (http://webservices.org) and SOAP # as a standard backend means to interact with a TWiki # installation. # # At present, it contains directives send mail through MailIn.pm # Requires the installation of SoapLite (www.SOAPlite.com), a very # complete and easy-to-use SOAP library. # # Contact MartinCleaver, kudos to Timo for getting WebServices to work. use strict; use lib ( '.' ); use lib ( '../lib' ); use TWiki; use TWiki::MailIn; use CGI; use SOAP::Transport::HTTP; SOAP::Transport::HTTP::CGI -> dispatch_to('WebServices') -> handle; package WebServices; sub sendMail { TWiki::MailIn::sendMail(@_); } sub retryMail { TWiki::MailIn::retry(@_); } sub helloWorld { Test::hi(@_); } package Test; ################################################################################ ## Name: hi ## Input Conditions: ## Input Parameters: ## Output Parameters: ## Description: TEST SUBROUTINE ## Error Conditions: ################################################################################ sub hi { return 'hello, world'; }