SPDL Example: Amazon and CiteSeer

Abstract

This document shows example executions of SPARQL queries that relying on web services. These use WSDL annotated with SPDL.

Status of this Document

This is the work of the author — it is not endorsed by the W3C members.

Example — annotated Amazon Web Services WSDL

This is a working excerpt of the Amazone Web Services WSDL currently used at Amazon. It shows:

Most of the elements are abbreviated. Hovering with the mouse or copying the region should get you the compete text.

<?xml version="1.0" encoding="UTF-8"?>

  <types>



















    </xs:schema>
  </types>
  <message name="ItemSearchRequestMsg">
    <part name="body" element="tns:ItemSearch"/>
  </message>
  <message name="ItemSearchResponseMsg">
    <part name="body" element="tns:ItemSearchResponse"/>
  </message>
  <message name="ItemLookupRequestMsg">
    <part name="body" element="tns:ItemLookup"/>
  </message>
  <message name="ItemLookupResponseMsg">
    <part name="body" element="tns:ItemLookupResponse"/>
  </message>
  <portType name="AWSECommerceServicePortType">
    <operation name="ItemSearch">
      <input message="tns:ItemSearchRequestMsg"/>
      <output message="tns:ItemSearchResponseMsg"/>
    </operation>
    <operation name="ItemLookup">
      <input message="tns:ItemLookupRequestMsg"/>
      <output message="tns:ItemLookupResponseMsg"/>
    </operation>
  </portType>
  <binding name="AWSECommerceServiceBinding" type="tns:AWSECommerceServicePortType">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>



  </binding>
  <service name="AWSECommerceService">
    <port name="AWSECommerceServicePort" binding="tns:AWSECommerceServiceBinding">
      <soap:address location="http://soap.amazon.com/onca/soap?Service=AWSECommerceService"/>
      <!-- soap:address location="http://localhost:8000/onca/soap?Service=AWSECommerceService"/ -->
    </port>
  </service>
</definitions>

Result Set

@@todo@@ add a discussion of the process model and the effects on the result set. Hare are some raw materials:

Example

Find out if Amazon has the publictions listed in a book's bibliography.:

PREFIX amazon: <http://amazon...>
PREFIX citeseer: <http://citeseer...>
SELECT ?who ?mid
 WHERE
   {

     GRAPH ?ep1
       {
         ?book amazon:title "Databases for Dummies" .
         ?book amazon:author "C.J. Date" .
         ?book amazon:isbn ?isbn1
       }
     ?service spdl:operation <http://amazon...> .
     ?service spdl:endPoint ?ep1

isbn
8

     GRAPH ?citeseerep
       {
         ?citation citeseer:isbn ?isbn1 .
         ?citation citeseer:title ?title .
         ?citation bin:author ?author
       }
     ?service spdl:operation <http://citeseer...>
     ?service spdl:endPoint ?citeseerep

isbntitleauthor
8foobob
8barjoe

     GRAPH ?ep1
       {
         ?book amazon:title ?title .
         ?book amazon:author ?author
         ?book amazon:isbn ?isbn2
       }

isbntitleauthorisbn2
8foobob7
8barjoe9

}



PREFIX amazon: <http://amazon...>
PREFIX citeseer: <http://citeseer...>
SELECT ?who ?mid
 WHERE
   {

||
||

     GRAPH ?ep1
       {
         ?book amazon:title "Databases for Dummies" .
         ?book amazon:author "C.J. Date" .
         ?book amazon:isbn ?isbn1
       }
     ?service spdl:operation <http://amazon...> .
     ?service spdl:endPoint ?ep1

|isbn1|
|8    |

     GRAPH ?citeseerep
       {
         ?citation citeseer:isbn ?isbn1 .
         ?citation citeseer:title ?title .
         ?citation bin:author ?author
       }
     ?service spdl:operation <http://citeseer...>
     ?service spdl:endPoint ?citeseerep

|isbn1|title|authr|
|8    | foo | bob |
|8    | bar | joe |

     GRAPH ?ep1
       {
         ?book amazon:title ?title .
         ?book amazon:author ?author
         ?book amazon:isbn ?isbn2
       }

|isbn1|title|authr|isbn2|
|8    | foo | bob | 7   |
|8    | bar | joe | 9   |

   }

Change Log

$Log: Examples.html,v $
    
Revision 1.4  2006/07/15 00:01:36  eric
    
~ nicole says the expansions look better in (justified) blocks
    
    
Revision 1.3  2006/06/16 11:34:51  eric
    
+ Example — annotated Amazon Web Services WSDL