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

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

revision 25 by dpavlin, Mon May 16 13:52:43 2005 UTC revision 33 by dpavlin, Tue May 17 11:09:08 2005 UTC
# Line 1  Line 1 
1  #!/usr/bin/perl -w  #!/usr/bin/perl -w
2    
3  use SOAP::Lite +trace => 'debug';  use SOAP::Lite; # +trace => 'debug';
4  my $HOST   = "http://localhost/~dpavlin/notice-sender/soap.cgi";  my $HOST   = "http://localhost/~dpavlin/notice-sender/soap.cgi";
5  my $NS     = "urn:Nos";  my $NS     = "http://localhost/Nos/SOAP/";
6  my $soap = SOAP::Lite  my $soap = SOAP::Lite
7          ->readable(1)          ->readable(1)
8          ->uri($NS)          ->uri($NS)
9          ->proxy($HOST);          ->proxy($HOST);
10    
11  my $som = $soap->add_member_to_list(  
12          SOAP::Data->name("list" => "My list"),  my $list_id = $soap->NewList({
13          SOAP::Data->name("email" => 'dpavlin@rot13.org'),                  list => 'My list',
14          SOAP::Data->name("name" => 'Dobrica Pavlinusic'),                  email => 'my-soap@example.com',
15          );          })->result || die "can't add list";
16          print "The response from the server was:\n".( $som->result || 'null' )."\n";  
17    print "added list ID $list_id\n";
18    
19    
20    my $member_id = $soap->AddMemberToList({
21                    list => 'My list',
22                    email => 'dpavlin@rot13.org',
23                    name => 'Dobrica Pavlinusic',
24            })->result || die "can't add user";
25    
26    print "added member ID $member_id\n";
27    
28    
29    my $message_id = $soap->AddMessageToList({
30                    list => 'My list',
31                    message => 'To: member@example.com
32    From: mylist@example.com
33    Subject: text
34    
35    This is a dummy test
36    ',
37            })->result || die "can't add message";
38    
39    print "added message ID $message_id\n";
40    
41  1;  1;

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

  ViewVC Help
Powered by ViewVC 1.1.26