| 1 |
#!/usr/bin/perl -w |
| 2 |
use SOAP::Lite; |
| 3 |
|
| 4 |
# A more involved example - creates a chunk of HTML |
| 5 |
# with links to the OpenURLs for each reference in |
| 6 |
# referencelist.txt. |
| 7 |
|
| 8 |
my $baseurl = "http://paracite.eprints.org/cgi-bin/openurl.cgi?"; |
| 9 |
|
| 10 |
my $service = SOAP::Lite |
| 11 |
-> service("http://paracite.eprints.org/paracite.wsdl"); |
| 12 |
|
| 13 |
open(FIN, "referencelist.txt"); |
| 14 |
print "<ul>\n"; |
| 15 |
foreach(<FIN>) |
| 16 |
{ |
| 17 |
chomp; |
| 18 |
$openurl = $service->doOpenURLConstruct($_, $baseurl); |
| 19 |
print '<li><a href="'.$openurl.'">'.$_.'</a></li>',"\n"; |
| 20 |
} |
| 21 |
print "</ul>\n"; |
| 22 |
close FIN; |