SOAP RDF query client -- wordnet demo

For reference, this rdf query over SOAP demo seems to work now :)

see http://ilrt.org/discovery/2001/06/rdfperl/ for supporting classes, ie.
the Squish wrapper for Eric's Perllib query engine. Attached is client
code (also below) and cgi script that provides the service. Very much a
rough cut, but promising...

--danbri

#!/usr/bin/perl -w

use SOAP::Lite;

my $query = '
SELECT ?x, ?l, ?c
FROM     http://xmlns.com/wordnet/1.6/Job
WHERE
  (web::type ?x rdfs::Class)
  (rdfs::label ?x ?l)
  (rdfs::description ?x ?c)
USING web FOR http://www.w3.org/1999/02/22-rdf-syntax-ns#
       rdfs FOR http://www.w3.org/2000/01/rdf-schema#
';

my $data = 'http://xmlns.com/wordnet/1.6/Job';

my $soap = SOAP::Lite
  -> uri('http://rdfweb.org/RDF/RDFWeb/SOAPDemo')
  -> proxy('http://fireball.dyndns.org/cgi-bin/soap');

#my $r = $soap->squish2algae($query, $data)->result(); # works :)
#my $r = $soap->textsquish($query, $data)->result(); # works :)
my $r = $soap->squish($query, $data)->result(); # get resultset

print "Result is $r \n\n";

my @res = @{$r};

foreach my $row (@res) {
  my %h = %{$row } ;
  foreach (keys %h) {
	print " $_ -> ", $h{$_}, " \n";
  }
}

Received on Thursday, 26 July 2001 15:53:04 UTC