develooper Front page | perl.fwp | Postings from March 2002

PGAS Web Service

Thread Next
Dave Hoover
March 12, 2002 19:26
PGAS Web Service
Message ID:
Inspired by Yanick's hack of the PGAS leaderboard
(, I was fiddling around with SOAP::Lite
tonight and got XML-RPC working with PGAS.  PGAS now has a web service that
allows people to query the database through Remote Procedure Calls.  I've
only created one method so far, but adding more will be trivial now that the
details are worked out.

If you're interested in playing with it, here's a brief example of how to
write a client and call the method:

#!perl -w

use strict;
use XMLRPC::Lite;

my $aref = XMLRPC::Lite
  -> proxy('')
  -> call('PGAS.getGolferID', 'Ton')
  -> result;

foreach my $golfer (@$aref) {
    print "ID = $golfer->{id}, NAME = $golfer->{name}\n";

As you can see, the method 'getGolferID' takes one argument (all or part of
a golfer's name) and returns a reference to an array of hashes.  The hashes
have two keys (name & id).  Multiple golfers will be returned when the name
passed to the method ('Ton' in the example above) matches more than one

I'll be adding more methods before TPR(0,2) so please let me know if you
have any requests.


Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About