/[notice-sender]/trunk/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 /trunk/soap.cgi

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

revision 25 by dpavlin, Mon May 16 13:52:43 2005 UTC revision 27 by dpavlin, Mon May 16 16:25:14 2005 UTC
# Line 1  Line 1 
1  #!/usr/bin/perl -w  #!/usr/bin/perl -w
2    
3    =head1 NAME
4    
5    soap.cgi - CGI SOAP interface to notice sender
6    
7    =cut
8    
9  use strict;  use strict;
10  use Nos qw(add_member_to_list add_message_to_queue);  use Nos;
11    
12    my $nos = new Nos(
13            dsn => 'dbi:Pg:dbname=notices',
14            user => 'dpavlin',
15            passwd => '',
16    );
17    
18    use SOAP::Transport::HTTP +trace => 'debug';
19    SOAP::Transport::HTTP::CGI
20            ->dispatch_to('Nos::SOAP')
21            ->handle;
22    
23    package Nos::SOAP;
24    
25    =head1 SOAP methods
26    
27    This methods are thin wrappers to provide SOAP calls.
28    
29    =head2 AddMemberToList
30    
31     $member_id = AddMemberToList(
32            list => "My list",
33            email => "e-mail@example.com",
34            name => "Full Name"
35     );
36    
37    =cut
38    
39    sub AddMemberToList {
40            my $self = shift;
41    
42            return $nos->add_member_to_list( %{ shift @_ } );
43    }
44    
45    =head2 AddMessageToList
46    
47     $message_id = AddMessageToList(
48            list => 'My list',
49            message => 'From: My list...'
50     );
51    
52    =cut
53    
54    sub AddMessageToList {
55            my $self = shift;
56    
57  use SOAP::Transport::HTTP;          return $nos->add_message_to_queue( %{ shift @_ } );
58  SOAP::Transport::HTTP::CGI->dispatch_to('Nos')->handle;  }
59    

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

  ViewVC Help
Powered by ViewVC 1.1.26