#!/bin/env perl -w # # Usage: biblinks-client.pl [--debug] [--html | --xml | --table] [proxy cgi] use SOAP::Lite; my $debug = (@ARGV and $ARGV[0] eq '--debug') ? shift(@ARGV) : 0; my $format = (@ARGV and $ARGV[0] =~ s/^--//) ? shift(@ARGV) : 'xml'; my $cgi = @ARGV ? shift(@ARGV) : 'http://ads.harvard.edu/ws/biblinks'; warn "$0: connecting to SOAP proxy $cgi...\n"; SOAP::Trace->import('all') if ($debug); my $response = SOAP::Lite -> uri('http://ads.harvard.edu/BibLinks') -> proxy($cgi) -> harvest(); die $response->faultcode, ', ', $response->faultstring if ($response->fault); my $result = $response->result; if ($format eq 'html') { print "
Links available: