Abstract Query

Sample PERL SOAP client script for abstract queries. The script takes a list of query parameters from the command line in the form key=value
#!/bin/env perl
# Usage: absquery-client.pl key=value [...]

use SOAP::Lite; 
use XML::Simple;
my %query = map { split(/=/,$_,2) } @ARGV;

my $response = SOAP::Lite
    -> uri('http://ads.harvard.edu/AbsQuery')
    -> proxy('http://ads.harvard.edu/ws/bibserver')
    -> query(%query);

print XMLout($response->result, noattr => 1);

Example of client usage:
$ absquery-client.pl author=accomazzi jou_pick=YES ref_stems=2001adass <opt> <anon> <title>ADS's Dexter Data Extraction Applet</title> <author>Demleitner, M.</author> <author>Accomazzi, A.</author> <author>Eichhorn, G.</author> <author>Grant, C. S.</author> <author>Kurtz, M. J.</author> <author>Murray, S. S.</author> <score>1</score> <pubdate>1/2001</pubdate> <bibcode>2001adass..10..321D</bibcode> <url>http://adsabs.harvard.edu/cgi-bin/nph-bib_query?bibcode=2001adass..10..321D</url> <link> <name>Abstract</name> <url>http://adsabs.harvard.edu/cgi-bin/nph-data_query?bibcode=2001adass..10..321D&amp;link_type=ABSTRACT</url> </link> <link> <name>Electronic On-line Article</name> <url>http://adsabs.harvard.edu/cgi-bin/nph-data_query?bibcode=2001adass..10..321D&amp;link_type=EJOURNAL</url> </link> <link> <name>Table of Contents</name> <url>http://adsabs.harvard.edu/cgi-bin/nph-data_query?bibcode=2001adass..10..321D&amp;link_type=TOC</url> </link> </anon> </opt> </PLAINTEXT> </BLOCKQUOTE> </BODY> </HTML>