/[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 33 by dpavlin, Tue May 17 11:09:08 2005 UTC revision 70 by dpavlin, Tue Aug 2 19:41:28 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;
4    
5    my $debug = 0;
6    $debug = 1 if (@ARGV);
7    
8  my $HOST   = "http://localhost/~dpavlin/notice-sender/soap.cgi";  my $HOST   = "http://localhost/~dpavlin/notice-sender/soap.cgi";
9  my $NS     = "http://localhost/Nos/SOAP/";  my $NS     = "http://localhost/Nos/SOAP/";
10  my $soap = SOAP::Lite  my $soap = SOAP::Lite
# Line 8  my $soap = SOAP::Lite Line 12  my $soap = SOAP::Lite
12          ->uri($NS)          ->uri($NS)
13          ->proxy($HOST);          ->proxy($HOST);
14    
15    $soap->on_debug(sub{print "# ",@_}) if ($debug);
16    
17  my $list_id = $soap->NewList({  my $list_id = $soap->NewList({
18                  list => 'My list',                  list => 'My list',
# Line 38  This is a dummy test Line 43  This is a dummy test
43    
44  print "added message ID $message_id\n";  print "added message ID $message_id\n";
45    
46    my $result = $soap->ListMembers({
47                    list => 'My list',
48    });
49    
50    die "can't list members ".$result->faultcode.": ".$result->faultstrig if ($result->fault);
51    
52    print "members:\n";
53    foreach my $m (@{$result->result}) {
54            print "\t",$m->{'email'},"\n";
55    }
56    
57    $soap->DeleteMemberFromList({
58            list => 'My list',
59            email => 'dpavlin@rot13.org',
60    })->result || die "can't delete member";
61    
62    print "deleted member\n";
63    
64    $soap->DeleteList({
65            list => 'My list'
66    });
67    
68    print "delete list\n";
69    
70  1;  1;

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

  ViewVC Help
Powered by ViewVC 1.1.26