W3C home > Mailing lists > Public > www-archive@w3.org > February 2002

SOAP/Squish/Anotea client

From: Dan Brickley <danbri@w3.org>
Date: Fri, 15 Feb 2002 13:29:57 -0500 (EST)
To: <www-archive@w3.org>
Message-ID: <Pine.LNX.4.30.0202151328130.5831-100000@tux.w3.org>

---------- Forwarded message ----------
Date: Thu, 14 Feb 2002 12:02:17 -0500
From: Dan Brickley <danbri@w3.org>

#!/usr/bin/perl -w
# vapourware.pl by danbri@w3.org $Id$
# Query webservice using Squish for Annotea RDF annotations of some URI
use SOAP::Lite;

my $URI= shift || 'http://news.com.com/2100-1023-834990.html';
print "Doing SOAP/Squish query of Annotea test db for: $URI\n";

my $query =    "SELECT ?x, ?c, ?b
		WHERE
		  (an::annotates ?x $URI)
		  (an::created ?x ?c)
		  (an::body ?x ?b)
		USING
		  an for http://www.w3.org/2000/10/annotation-ns#
		  dc for http://purl.org/dc/elements/1.1/";

my $soap = SOAP::Lite
 -> uri('http://rdfweb.org/RDF/RDFWeb/SOAPDemo')
 -> proxy('http://xxxxx.w3.org/danbri/CGI/soap'); # URIs for query  protocol, and server

my $r = $soap->squish($query)->result();
foreach my $row ( @{$r} ) {
  my %hits = %{$row} ;
  foreach my $col (keys %hits) {
	print "$col: ", $hits{$col}, " \n";
  }
  print "\n";
}
Received on Friday, 15 February 2002 13:29:56 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 7 November 2012 14:17:16 GMT