/[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

Annotation of /trunk/soap-client.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 33 - (hide annotations)
Tue May 17 11:09:08 2005 UTC (18 years, 11 months ago) by dpavlin
File MIME type: text/plain
File size: 847 byte(s)
added new_list method, cleanus, e-mail is now unique for user, adding user with different full name will just update full name for that record.

1 dpavlin 25 #!/usr/bin/perl -w
2    
3 dpavlin 33 use SOAP::Lite; # +trace => 'debug';
4 dpavlin 25 my $HOST = "http://localhost/~dpavlin/notice-sender/soap.cgi";
5 dpavlin 27 my $NS = "http://localhost/Nos/SOAP/";
6 dpavlin 25 my $soap = SOAP::Lite
7     ->readable(1)
8     ->uri($NS)
9     ->proxy($HOST);
10    
11 dpavlin 33
12     my $list_id = $soap->NewList({
13 dpavlin 27 list => 'My list',
14 dpavlin 33 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',
22 dpavlin 27 email => 'dpavlin@rot13.org',
23     name => 'Dobrica Pavlinusic',
24 dpavlin 33 })->result || die "can't add user";
25 dpavlin 25
26 dpavlin 33 print "added member ID $member_id\n";
27    
28    
29     my $message_id = $soap->AddMessageToList({
30 dpavlin 27 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 dpavlin 33 })->result || die "can't add message";
38    
39     print "added message ID $message_id\n";
40    
41 dpavlin 25 1;

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26