--- trunk/soap-client.pl 2005/05/16 16:25:14 27 +++ trunk/soap-client.pl 2005/05/17 11:09:08 33 @@ -1,6 +1,6 @@ #!/usr/bin/perl -w -use SOAP::Lite; #+trace => 'debug'; +use SOAP::Lite; # +trace => 'debug'; my $HOST = "http://localhost/~dpavlin/notice-sender/soap.cgi"; my $NS = "http://localhost/Nos/SOAP/"; my $soap = SOAP::Lite @@ -8,13 +8,25 @@ ->uri($NS) ->proxy($HOST); -print "added member ID ",$soap->AddMemberToList({ + +my $list_id = $soap->NewList({ + list => 'My list', + email => 'my-soap@example.com', + })->result || die "can't add list"; + +print "added list ID $list_id\n"; + + +my $member_id = $soap->AddMemberToList({ list => 'My list', email => 'dpavlin@rot13.org', name => 'Dobrica Pavlinusic', - })->result,"\n"; + })->result || die "can't add user"; -print "added message ID ",$soap->AddMessageToList({ +print "added member ID $member_id\n"; + + +my $message_id = $soap->AddMessageToList({ list => 'My list', message => 'To: member@example.com From: mylist@example.com @@ -22,5 +34,8 @@ This is a dummy test ', - })->result,"\n"; + })->result || die "can't add message"; + +print "added message ID $message_id\n"; + 1;