/[notice-sender]/jifty-dbi/soap.cgi
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /jifty-dbi/soap.cgi

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

trunk/soap.cgi revision 27 by dpavlin, Mon May 16 16:25:14 2005 UTC jifty-dbi/soap.cgi revision 91 by dpavlin, Mon Dec 18 19:38:50 2006 UTC
# Line 4  Line 4 
4    
5  soap.cgi - CGI SOAP interface to notice sender  soap.cgi - CGI SOAP interface to notice sender
6    
7    =head1 DESCRIPTION
8    
9    Provide example SOAP service using CGI script.
10    
11    Available methods are in C<Nos::SOAP> package, see C<Nos>.
12    
13  =cut  =cut
14    
15  use strict;  use strict;
16  use Nos;  use Nos 0.6;
17    use Cwd qw(abs_path);
18    
19  my $nos = new Nos(  my $aliases = abs_path($0);
20    $aliases =~ s#/[^/]+$##;
21    $aliases .= '/t/aliases';
22    
23    my $nos = new Nos::SOAP(
24          dsn => 'dbi:Pg:dbname=notices',          dsn => 'dbi:Pg:dbname=notices',
25          user => 'dpavlin',          user => 'dpavlin',
26          passwd => '',          passwd => '',
27            aliases => $aliases,
28  );  );
29    
30  use SOAP::Transport::HTTP +trace => 'debug';  use SOAP::Transport::HTTP +trace => 'debug';
31  SOAP::Transport::HTTP::CGI  SOAP::Transport::HTTP::CGI
32          ->dispatch_to('Nos::SOAP')          ->dispatch_to($nos)
33          ->handle;          ->handle;
34    
35  package Nos::SOAP;  1;
   
 =head1 SOAP methods  
   
 This methods are thin wrappers to provide SOAP calls.  
   
 =head2 AddMemberToList  
   
  $member_id = AddMemberToList(  
         list => "My list",  
         email => "e-mail@example.com",  
         name => "Full Name"  
  );  
   
 =cut  
   
 sub AddMemberToList {  
         my $self = shift;  
   
         return $nos->add_member_to_list( %{ shift @_ } );  
 }  
   
 =head2 AddMessageToList  
   
  $message_id = AddMessageToList(  
         list => 'My list',  
         message => 'From: My list...'  
  );  
   
 =cut  
   
 sub AddMessageToList {  
         my $self = shift;  
   
         return $nos->add_message_to_queue( %{ shift @_ } );  
 }  
   

Legend:
Removed from v.27  
changed lines
  Added in v.91

  ViewVC Help
Powered by ViewVC 1.1.26