CARVIEW |
Select Language
HTTP/2 200
date: Thu, 09 Oct 2025 03:40:47 GMT
content-type: text/html; charset=utf-8
content-encoding: gzip
content-location: Overview.html
last-modified: Sun, 07 Dec 2008 01:06:52 GMT
cache-control: max-age=21600
expires: Thu, 09 Oct 2025 09:40:47 GMT
vary: Accept-Encoding
x-backend: www-mirrors
x-request-id: 98badbca3d5c2ffb
strict-transport-security: max-age=15552000; includeSubdomains; preload
content-security-policy: frame-ancestors 'self' https://cms.w3.org/ https://cms-dev.w3.org/; upgrade-insecure-requests
cf-cache-status: BYPASS
set-cookie: __cf_bm=Ys93FdLD5oNt0DFqbUx7u_9FiL.WU75M8Z6Zni.Qonc-1759981247-1.0.1.1-Ik9RHnFCe9FK5KWxbyDkfbbMl_JTVrJOZHsttIcTP0U6TeFMETHQz.Anr8FnPmt9VRUEsJjcmoYv7mFPOF0M._iElVlfXmEEFVVmazau1SQ; path=/; expires=Thu, 09-Oct-25 04:10:47 GMT; domain=.w3.org; HttpOnly; Secure; SameSite=None
server: cloudflare
cf-ray: 98badbca3d5c2ffb-BLR
alt-svc: h3=":443"; ma=86400
WP3


WS2: Work Package 2
Annotated Service Invocation
Execute (services described by) WSDL interfaces to answer user queries.
Procedure
- Identify the information in web services.
- annotate existing descriptions
- Query that specific information.
SELECT ?asin ?title WHERE { _:b tns:id "0FWYBWB91M5S26YBE382" ; tns:keywords "Weaving" ; tns:index "Books" ; tns:asin ?asin ; tns:title ?title ; tns:page ?page }
- Automatically invoke the appropriate service(s).
What's New?
- Modeled operations' inputs and outputs as rules.
- Modeled parameters in user query as ground facts.
- Choreography!
- Separate documentation for SPARQL Anntoations and SPARQL Annotations on WSDL.
Features of SPARQL in WSDL (SPDL)
- Annotations on web service operations
- Builds RDF graph query pattern
- Uses (relatively familiar) SPARQL query pattern
- — Sufficient for invocation given a grounding for the pattern
Connecting SPARQL to XML
<ItemAttributes> <Title>Learning to Weave, Revised Edition</Title> <Author>Deborah Chandler</Author> <Author>Debbie Redding</Author> </ItemAttributes>
<xs:element name="Item"> <xs:complexType spat:SPAT='?book tns:doctitle xpath("aws:Title")...'> <xs:sequence> <xs:element name="Title" type="xs:string" minOccurs="0"/> <xs:element name="Author" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType> </xs:element>
Identifying information
- Using SPARQL Annotations (SPARQL + XPath) in WSDL:
- SPARQL: SQL-like RDF query language
SELECT ?tile WHERE { ?response tnss:doctitle ?title }
- XPath: identify locations in a document
aws:ItemSearchResponse/aws:Items/aws:Item/aws:Title
- WSDL/XSD: associate messages (documents) with services
<definitions><types><element name="ItemSearchResponse"></element></types>... <message name="ItemSearchResponseMsg"/></definitions>
- SPARQL: SQL-like RDF query language
- SPARQL annotations tie RDF data to locations in a Web Services message.
<xs:element name="Item" spat:SPAT='?book tns:doctitle xpath("aws:Title")'/>
Demo excerpts
PREFIX tnss: <https://webservices.amazon.com/AWSECommerceService/2004-11-10> SELECT ?title ?page WHERE { _:b tnss:id "0FWYBWB91M5S26YBE382" ; tnss:keywords "Weaving" ; tnss:index "Books" ; tnss:asin ?asin ; tnss:doctitle ?title ; tns:page ?page }
title | page |
---|---|
"Learning to Weave, Revised Edition" | "https://...ASIN=1883010039..." |
"Weaving Music into Young Minds with Education (Weaving Music Into Young Minds With Education)" | "https://...ASIN=0766800199..." |
"Spin to Knit: The Knitter's Guide to Making Yarn" | "https://...ASIN=1596680075" |
SAWSDL Specification
- Semantic Annotations for WSDL and XML Schema
- W3C Candidate Recommendation
- Defines:
- modelReference: association between a WSDL entity and a concept in some semantic model
- XSD complex types, simple types, elements, and attributes
- WSDL operations and interfaces
- liftingSchemaMapping and loweringSchemaMapping;, transformation of information from Web Service messages to semantic model
- XSD elements, complex types and simple types
- modelReference: association between a WSDL entity and a concept in some semantic model
SAWSDL Specification
- Accompanying Usage Guide references:and describes their use in SAWSDL.
SPDL Expressed in SAWSDL
a sawsdl:loweringSchemaMapping:
<xs:element name="Item"> <!-- xs:complexType spat:SPAT='?book tns:doctitle xpath("aws:Title") --> <xs:complexType sawsdl:loweringSchemaMapping='&AWS;title'> <xs:sequence> <xs:element name="Author" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> <xs:element name="Title" type="xs:string" minOccurs="0"/> </xs:sequence> </xs:complexType> </xs:element>
points to a document containing the SPDL annotations:
:id spat:SPAT '?req :id xpath(".")' . :keywords spat:SPAT '?req :keywords xpath("tns:Keywords") ; :index xpath("tns:SearchIndex")' . :asin spat:SPAT '?book :asin xpath("tns:ASIN")' . :title spat:SPAT '?book tns:docTitle xpath("aws:Title")' .
Operation Rules
- Model information in Input and Output as a graph pattern.
- Allow engine to infer service invocation paths.
Very simple inference appears to model reasonable use cases.
Rule Construction Details
- Traverse operation input and output:
<operation name="ItemSearch"> <input message="tns:ItemSearchRequestMsg"/> <output message="tns:ItemSearchResponseMsg"/> </operation>
for the annotations:<xs:element name="ItemSearch" spat:SPAT='?req tns:asin xpath("tns:ASIN")'> ... <xs:element name="ASIN" type="xs:string" minOccurs="0"/> ... </xs:element>
- Build rule from rule body (Input) and rule head (Output):
┌ op {https://webservices.amazon.com/AWSECommerceService/2004-11-10}ItemLookup: │ fwrule ask(?req this:id XPath(., 91642dc) && │ ?req this:asin XPath(., 919d638)) │ assert(?req this:page _:<>:8.XPath(this:Items/this:Item/this:DetailPageURL, 91d37c8) && │ ?req this:reqId _:<>:9.XPath(., 9211c38) && │ ?req this:asin _:<>:10.XPath(tns:ASIN, 920b2b0) && │ ?req this:title _:<>:11.XPath(tns:Title, 9298a50)) │ -->{<qname:{https://webservices.amazon.com/AWSECommerceService/2004-11-10}ItemLookup>}
Rule Invocation Details
The ground facts from the users query:
PREFIX tns: <https://dev.w3.org/cvsweb/perl/modules/W3C/SPDL/descriptions/AWSECommerceService-SAWSDL-item-terms.ttl#> SELECT ?title ?page WHERE { _:b tns:id "0FWYBWB91M5S26YBE382" ; tns:keywords "Weaving" ; tns:index "Books" ... }
combined with a rule head:
┌ op {AWS:ItemSearch: │ fwrule ask(?req this:id XPath(., 8ae97f0) && │ ?req this:keywords XPath(tns:Keywords, 91b1d40) && │ ?req this:index XPath(tns:SearchIndex, 91b1d40)) │ assert(?req this:reqId _:19.XPath(., 92b17b0) && │ ?req this:asin _:20.XPath(tns:ASIN, 92d6890) && │ ?req this:title _:21.XPath(tns:Title, 93150e0)) │ -->{AWS:ItemSearch}
produce new inferences:
_:21 this:reqId _:19.XPath(., 92b17b0) . _:21 this:asin _:20.XPath(tns:ASIN, 92d6890) . _:21 this:title _:21.XPath(tns:Title, 93150e0) .
Rule Combination Details
The produce of one inference:
_:21 this:reqId _:19.XPath(., 92b17b0) . _:21 this:asin _:20.XPath(tns:ASIN, 92d6890) . _:21 this:title _:21.XPath(tns:Title, 93150e0) .
combined with another rule head:
┌ op {AWS:ItemLookup: │ fwrule ask(?req this:id XPath(., 91b1548) && │ ?req this:asin XPath(., 920be4c)) │ assert(?req this:page _:8.XPath(tns:Items/tns:Item/tns:DetailPageURL, 9127a6c) && │ ?req this:reqId _:9.XPath(., 92b17b0) && │ ?req this:asin _:10.XPath(tns:ASIN, 92d6890) && │ ?req this:title _:11.XPath(tns:Title, 93150e0)) │ -->{AWS:ItemLookup}
produces new inferences:
_:22 this:page _:8.XPath(this:Items/this:Item/this:DetailPageURL, 91d37c8) . _:22 this:reqId _:9.XPath(., 9211c38) . _:22 this:asin _:10.XPath(tns:ASIN, 920b2b0) . _:22 this:title _:11.XPath(tns:Title, 9298a50) .
Querying Rule Closure
The closure of the rules is now useful for answering user queries:
PREFIX tnss: <https://webservices.amazon.com/AWSECommerceService/2004-11-10> SELECT ?title ?page WHERE { _:b tnss:id "0FWYBWB91M5S26YBE382" ; tnss:keywords "Weaving" ; tnss:index "Books" ; tnss:asin ?asin ; tnss:doctitle ?title ; tns:page ?page }
title | page | _:b | asin |
---|---|---|---|
XPath(tns:Title) | XPath(...PageURL) | _:22 | _:20.XPath(tns:ASIN) |
XPath(tns:Title) | XPath(...PageURL) | _:22 | _:10.XPath(tns:ASIN) |
Studying Proof Chain
The proofs of these rules illustrate how to invoke the services:
_:22 this:page XPath(...PageURL) .
-->{
[
}fwrule ask(?req this:id XPath(.) &&
?req this:asin XPath(.))
assert(?req this:page XPath(...PageURL) &&
?req this:reqId _:9.XPath(.) &&
?req this:asin _:10.XPath(tns:ASIN) &&
?req this:title _:11.XPath(tns:Title))
-->{AWSECommerceService:ItemLookup}
_:22 this:asin _:20.XPath(tns:ASIN) .
-->{
[
}fwrule ask(?req this:id XPath(.) &&
?req this:keywords XPath(tns:Keywords) &&
?req this:index XPath(tns:SearchIndex))
assert(?req this:reqId _:19.XPath(.) &&
?req this:asin _:20.XPath(tns:ASIN) &&
?req this:title XPath(tns:Title))
-->{AWSECommerceService:ItemSearch}
_:22 this:index "Books" .
-->{<>}
_:22 this:id "0FWYBWB91M5S26YBE382" .
-->{<>}
_:22 this:keywords "Weaving" .
-->{<>}
]_:22 this:id "0FWYBWB91M5S26YBE382" .
-->{<>}
]Invoking Rule Services
- Base Rules (inner-most nesting) are prooven by ground facts in the query.
These are executed first. - Dependent Rules use, at least in part, the product of these executions.
- These solutions produced by executing the queries replace the original solutions.
Documentation
- SPARQL Annotations on WSDL describes the strategy.
- AWS Choreography Example shows the working details.
Conclusions
- The SPDL annotations for AWS:ItemSearch are sufficient to execute example queries.
- The demonstrator is able to use that information to invoke operations in the correct order.
- Minimal annotation is required for automatic invocation.
- Only minimal inference required.
Future Work
There's always more to play with...
- Clean up result iteration algorithm.
- Experiment with wider range of services.
- Implement in other inference engines.
- Many potential features to add...
Questions/Discussion
Impressions of the demonstrator.
Applicability to industry today and tomorrow.
Applicability to users today and tomorrow.
