You are on page 1of 23

Web Service Semantic Annotation

SWAP Group - Dip. Informatica di Bari


Outline
Standard per l’annotazione semantica
SAWSDL: Semantic Annotations for WSDL
and XML Schema

SA-REST: Semantic Annotations for REST

Tabella comparativa

Architettura
Scenario d’uso

Mockup
Sviluppi futuri

2
Standard per l’annotazione
semantica
Semantic Annotations for WSDL
4 and XML Schema [SAWSDL]
Annotazione semantica di Web Service descritti tramite WSDL
Insieme di attributi che estendono WSDL 2.0
Collega concetti presenti in una qualsiasi ontologia ad elementi del
documento WSDL
Non impone l’uso di alcun linguaggio specifico per la rappresentazione del
modello semantico
E’ ulteriormente estendibile
W3C Recommendation dal 28 Agosto 2007
5
6
<wsdl:description
targetNamespace="http://www.w3.org/2002/ws/sawsdl/spec/wsdl/order#"
xmlns="http://www.w3.org/2002/ws/sawsdl/spec/wsdl/order#"
xmlns:wsdl="http://www.w3.org/ns/wsdl"
xmlns:xs="http://www.w3.org/2001/XMLSchema">

<wsdl:types>
<xs:schema targetNamespace="http://www.w3.org/2002/ws/sawsdl/spec/wsdl/order#"
elementFormDefault="qualified">
<xs:element name="OrderRequest">
...
</xs:element>
<xs:complexType name="item">
...
</xs:complexType>
<xs:element name="OrderResponse" type="confirmation" />
<xs:simpleType name="confirmation">
<xs:restriction base="xs:string">
<xs:enumeration value="Confirmed" />
<xs:enumeration value="Pending" />
<xs:enumeration value="Rejected" />
</xs:restriction>
</xs:simpleType>
</xs:schema>
</wsdl:types>

<wsdl:interface name="Order">
<wsdl:operation name="order" pattern="http://www.w3.org/ns/wsdl/in-out">
<wsdl:input element="OrderRequest" />
<wsdl:output element="OrderResponse" />
</wsdl:operation>
</wsdl:interface>
</wsdl:description>

7
<wsdl:description
targetNamespace="http://www.w3.org/2002/ws/sawsdl/spec/wsdl/order#"
xmlns="http://www.w3.org/2002/ws/sawsdl/spec/wsdl/order#"
xmlns:wsdl="http://www.w3.org/ns/wsdl"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:sawsdl="http://www.w3.org/ns/sawsdl">

<wsdl:types>
<xs:schema targetNamespace="http://www.w3.org/2002/ws/sawsdl/spec/wsdl/order#"
elementFormDefault="qualified">
<xs:element name="OrderRequest"
sawsdl:modelReference="http://www.w3.org/2002/ws/sawsdl/spec/ontology/purchaseorder#OrderRequest"
sawsdl:loweringSchemaMapping="http://www.w3.org/2002/ws/sawsdl/spec/mapping/RDFOnt2Request.xml">
...
</xs:element>
<xs:complexType name="item">
...
</xs:complexType>
<xs:element name="OrderResponse" type="confirmation" />
<xs:simpleType name="confirmation"
sawsdl:modelReference="http://www.w3.org/2002/ws/sawsdl/spec/ontology/
purchaseorder#OrderConfirmation">
<xs:restriction base="xs:string">
<xs:enumeration value="Confirmed" />
<xs:enumeration value="Pending" />
<xs:enumeration value="Rejected" />
</xs:restriction>
</xs:simpleType>
</xs:schema>
</wsdl:types>

<wsdl:interface name="Order"
sawsdl:modelReference="http://example.org/categorization/products/electronics">
<wsdl:operation name="order" pattern="http://www.w3.org/ns/wsdl/in-out"
sawsdl:modelReference="http://www.w3.org/2002/ws/sawsdl/spec/ontology/
purchaseorder#RequestPurchaseOrder">

8
<wsdl:input element="OrderRequest" />
<wsdl:output element="OrderResponse" />
</wsdl:operation>
</wsdl:interface>
</wsdl:description>
9
10
Semantic Annotation for REST
11 [SA-REST]
Automatizzare la fase di mediazione e composizione (mashup) di servizi
RESTful
Insieme di attributi che estendono (X)HTML (che non è stato pensato per
catturare le descrizioni di un servizio)
Annota porzioni di codice (X)HTML che contengono descrizioni non machine-
readable
Utilizza RDFa, GRDDL o microformati (hCard, hCalendar, hResume)
E’ ulteriormente estendibile
<html xmlns:sarest=”http://lsdis.cs.uga.edu/SAREST#”>
...
<p about=” http://craigslist.org/search/”>
The logical input of this service is an
<span property=”sarest:input”>
http://lsdis.cs.uga.edu/ont.owl#Location_Query
</span>
object. The logical output of this service is a list of
<span property=”sarest:output”>
http://lsdis.cs.uga.edu/ont.owl#Location
</span>
objects. This service should be invoked using an
<span property=”sarest:action”>HTTP GET</span>.
<meta property=”sarest:lifting” content=“http://craigslist.org/api/
lifting.xsl”/>
<meta property=”sarest:lowering” content=“http://craigslist.org/api/
lowering.xsl”/>
<meta property=”sarest:operation” content= “http://lsdis.cs.uga.edu/
ont.owl#Location_Search”/>
</p>
...

...
The logical input of this service is an http://lsdis.cs.uga.edu/ont.owl#Location_Query object.
The logical output of this service is a list of http://lsdis.cs.uga.edu/ont.owl#Location objects.

12
This service should be invoked using an HTTP GET.
...
13 Tabella comparativa
SAWSDL SA-REST

Scopo Annotazione semantica Mashup

Prima sottomissione novembre 2005 agosto 2007

Modello semantico OWL, RDF, DAML+OIL RDFa, Microformati

Stato W3C Recommendation ‘08 W3C Activity incubator

Pub. scientifiche 1 148 5

Citazioni 2 106 3

1) Fonte: Faceted DBLP


2) Fonte: Bibsonomy.org/
150
SAWSDL SA-REST
135
122
120

105
Numero di articoli scientifici

90

75

60

45

30

12 14
15

14
2 2 1
0
2007 2008 2009
Architettura
User

Annotation Service

SAWSDL4J / WSDL4J

Pellet Reasoner
UDDI4J

META
Ontology repository

UDDI

Discovery Service

16
17 Scenario d’uso
Natural language To approve/reject
descriptions suggested annotations

WSDL file CODEArchitects CODEArchitects SAWSDL file


META
Annotation Tool Annotation Tool
Mockup
19
20
21
22

Sviluppi futuri

Associazioni semantiche anche per Precondizioni ed Effetti: maggior


automazione nella fase di composizione
Dibattito

You might also like