SPARQL Annotations in WSDL (SPDL) Project

Work in progress.
$Revision: 1.18 $ of $Date: 2007/02/10 02:27:06 $
Eric Prud'hommeaux, W3C <>


This document describes the SPARQL Annotations in WSDL (SPDL) project, a system for allowing web services to provide bindings for SPARQL queries. SPDL integrates WSDL, XML Schema, WSDL, XPath and SPARQL to allow SPARQL queries to choreograph and invoke web services and bind the returned information to SPARQL results.

Status of this Document

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

Table of Contents

1 Introduction

SPARQL Annotations in WSDL (SPDL) maps information between RDF Graphs and the XML messages used in web service. This mapping enables RDF applications to invoke web services and use the resulting data.

W3C's SPARQL Query Language for RDF offers the semantic web a standard way to query a materialized or conceptual RDF graph. WSDL 2.0 provides the information necessary to invoke web services, but provides no explicit semantics. SPARQL Annotations (SPAT) provide a conduit between RDF graphs and XML documents. SPDL applies these annotations to WSDL and the associated XML Schema provide the necessary information to bridge Web Services and the Semantic Web.

2 Constituent Technologies

SPDL uses a combination and extension of many technologies:

3. Test Service

The code is tested against an annotated version of Amazon's own WSDL description of their web services. This was chosen for its practicality, familiarty, and complexity; it provides a realistic web services demonstration.

4. Example: Amazon Item Search

SPDL was implemented and tested on annotated Amazon Web Services WSDL service description. The Amazon WSDL describes many web servise offered by Amazon. A test program demonstrates how a small number of annotations enabled a user query to choreograph two Amazon Web Service operations. The process is documented in AWS Choreography Example.

5. SPARQL Extensions

The SPARQL PATHPATTERNs required modification of the SPARQL grammar:

6. XML Schema Implementation Extensions

An existing XML Schema processor had to be extended in two ways:

6.1 Contextual Callbacks

No existing schema libraries supported handler dispatch for non-XML Schema data. The XML Schema language documents two distinct ways to include non-schema data in a schema:

  1. Attributes in a differen namespace from XML Schema.
  2. Contents of the Appinfo element.

The XML::Validator::Schema was extended to allow a the caller to register handlers for given namespaces. The handler is called when an attribute or an Appinfo sub-element with that namespace is found:

<xs:element name="SubscriptionId" spat:SPAT='?req tns:id xpath("tns:SubscriptionId")'/>
<xs:element name="SubscriptionId"/>
  PATHPATTERN { ?X tns:id xpath("tns:SubscriptionId") }

XPaths in these annotations are resolved relative to the parent context.

SPDL uses this extension point to enable contextual parsing of SPARQL annotations. The context includes the location in the schema and the current namespaces.

6.2 Document Generation

The schema-validation library was extended with functions to, given a set of bindings of XPath to PCData, generate a valid XML document with that data. The extension is used to generate the request message. It takes the bindings from SPARQL variables to XPath locations and creates a valid request message with those bindings substituted into the message. (Extracting the bindings from the response message is simply done with an XPath processor.)

7. Progress

The first stage of this project was a success. It verified that annotations could be added to existing WSDL schemas to provide intuitive and easy to maintain semantics. Further, it demonstrated that semantic web machinery could use those annotations to automatically invoke queries.

The second stage demonstrated the use of a rule system to choreograph services annotated with SPDL annotations. This system is compatible with conventional rules for ontology mapping, enabling better use of the annotated services.

8. Next Steps

I propose the following work, in order of importance:

Extended SPARQL mapping:
The SPARLQ language is much more expressive than simple conjuntion. Mapping user queries to more expressive annotations will allow more accurate expression of the service semantics.
Relationship to higher-level Web Services langauages
WSCDL Web Services Choreography Description Language expresses choreography data. BPEL Business Process Execution Language describes the business process interactions. It is possible that SPDL choreograph choices can be informed by both these languages. It is also possible that SPDL choreography choices can be expressed in these languages.
Cost modeling:
Additional meta-data can supply costs to the alternative orchestrations. The query resolution/execution system can use this information to select from redundant executions paths. Costs can reflect financial service costs or time or other resource costs.

A. Resources

<Eric Prud'hommeaux> Alternate team contact Semantic Annotations for Web Services Description Language Working Group

Change History

$Log: Overview.html,v $
Revision 1.18  2007/02/10 02:27:06  eric
+ author

Revision 1.17  2007/02/07 14:09:01  eric
+ review feedback: need clear purpose statement

Revision 1.16  2007/01/30 03:52:36  eric
- moved procedural details to AWS Choreography Example

Revision 1.15  2007/01/29 23:38:28  eric
~ adapting to use the SPARQL Annotations page

Revision 1.14  2007/01/27 04:38:40  eric
+ more links

Revision 1.13  2007/01/26 19:07:53  eric
. snapshot

Revision 1.12  2007/01/25 19:27:27  eric
+ anchor SPAT and link to the spec

Revision 1.11  2006/07/15 23:28:22  eric
+ nav

Revision 1.10  2006/06/16 11:48:45  eric
+ descriptions of attribute and element annotation callbacks (from XML Schema)

Revision 1.9  2006/06/16 11:36:15  eric
+ link to annotated Amazon Web Services WSDL
~ changed examples to use attribute notation

Revision 1.8  2006/06/16 09:11:50  eric
+ Change History