/[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 27 by dpavlin, Mon May 16 16:25:14 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     = "http://localhost/Nos/SOAP/";  my $NS     = "http://localhost/Nos/SOAP/";
6  my $soap = SOAP::Lite  my $soap = SOAP::Lite
# Line 8  my $soap = SOAP::Lite Line 8  my $soap = SOAP::Lite
8          ->uri($NS)          ->uri($NS)
9          ->proxy($HOST);          ->proxy($HOST);
10    
11  print "added member ID ",$soap->AddMemberToList({  
12    my $list_id = $soap->NewList({
13                    list => 'My list',
14                    email => 'my-soap@example.com',
15            })->result || die "can't add list";
16    
17    print "added list ID $list_id\n";
18    
19    
20    my $member_id = $soap->AddMemberToList({
21                  list => 'My list',                  list => 'My list',
22                  email => 'dpavlin@rot13.org',                  email => 'dpavlin@rot13.org',
23                  name => 'Dobrica Pavlinusic',                  name => 'Dobrica Pavlinusic',
24          })->result,"\n";          })->result || die "can't add user";
25    
26  print "added message ID ",$soap->AddMessageToList({  print "added member ID $member_id\n";
27    
28    
29    my $message_id = $soap->AddMessageToList({
30                  list => 'My list',                  list => 'My list',
31                  message => 'To: member@example.com                  message => 'To: member@example.com
32  From: mylist@example.com  From: mylist@example.com
# Line 22  Subject: text Line 34  Subject: text
34    
35  This is a dummy test  This is a dummy test
36  ',  ',
37          })->result,"\n";          })->result || die "can't add message";
38    
39    print "added message ID $message_id\n";
40    
41  1;  1;

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

  ViewVC Help
Powered by ViewVC 1.1.26