[system] / trunk / xmlrpc / xmlrpcclient.pl Repository:
ViewVC logotype

Annotation of /trunk/xmlrpc/xmlrpcclient.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 279 - (view) (download) (as text)

1 : gage 279 #!/usr/local/bin/perl -w
2 :    
3 :     #
4 :     use XMLRPC::Lite;
5 :     my $soap = XMLRPC::Lite
6 :     # ->uri('http://webwork-db.math.rochester.edu/Demo/')
7 :     -> proxy('http://webwork-db.math.rochester.edu/mod_xmlrpc/');
8 :    
9 :    
10 :     my $result = $soap->call("Demo.hi");
11 :    
12 :    
13 :     unless ($result->fault) {
14 :     print $result->result(),"\n";
15 :     } else {
16 :     print join ', ',
17 :     $result->faultcode,
18 :     $result->faultstring;
19 :     }
20 :     #
21 :     #
22 :     #use SOAP::Lite
23 :     # on_fault => sub { my($soap, $res) = @_;
24 :     # die ref $res ? $res->faultstring : $soap->transport->status, "\n";
25 :     # };
26 :     #my $soap = SOAP::Lite
27 :     # -> uri('http://www.soaplite.com/Temperatures')
28 :     # -> proxy('http://http://services.soaplite.com/temper.cgi');
29 :     # eval {
30 :     # print $soap->c2f(37.5)->result;
31 :     # 1 } or die;
32 :    
33 :     #!perl -w
34 :     #!d:\perl\bin\perl.exe
35 :    
36 :     # -- SOAP::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko --
37 :    
38 :     #use SOAP::Lite
39 :     # uri => 'http://www.soaplite.com/My/Examples',
40 :     # proxy => 'http://localhost/mod_soap/My/Examples/',
41 :     ## proxy => 'http://localhost/cgi-bin/soap.cgi', # local CGI server
42 :     ## proxy => 'http://localhost/', # local daemon server
43 :     ## proxy => 'http://localhost/soap', # local mod_perl server
44 :     ## proxy => 'https://localhost/soap', # local mod_perl SECURE server
45 :     ## proxy => 'tcp://localhost:82', # local tcp server
46 :     ## proxy => 'http://login:password@localhost/cgi-bin/soap.cgi', # local CGI server with authentication
47 :     #
48 :     ## proxy => 'jabber://user:password@server:port/to@address/', # Jabber server
49 :     #
50 :     ## following examples are one-way only, they don't return any response
51 :     ## proxy => 'ftp://login:password@ftp.somewhere.com/relative/path/to/file.xml', # ftp server
52 :     ## proxy => 'ftp://login:password@ftp.somewhere.com//absolute/path/to/file.xml', # ftp server
53 :     #
54 :     ## you can always pass more than one parameter for proxy
55 :     ## proxy => ['mailto:destination.email@address', smtp => 'smtp.server', From => 'your.email', Subject => 'SOAP message'], # smtp server
56 :     #;
57 :     #
58 :     #print SOAP::Lite->new->getStateName(1)->result;

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9