Linked Services
 Dr. Carlos Pedrinaci
 The Open University

    SSAIE 2010, Heraklion
Outline


• Web Services or Services on the Web?
• The Semantic Web and the Web of Data
• Linked Services - Integrating Services with
  the Web of Data
 –Annotating WSDLs
 –Annotating Web APIs
• Unified Discovery and Publication on the
  Web of Data
Preparation for Hands-On


• The material shown in this session will be
  the basis for the hands-on session
  afterwards
• You’ll need Firefox
• Tabulator extension for Firefox
 –http://dig.csail.mit.edu/2007/tab/
Web Services
          or
Services on the Web?
Web Services


• Large number of standards and
  implementations
   – WSDL, BPEL, WS-Coordination, WS-
    Transaction, WS-AtomicTransaction,
    WS- (see Cesare’s presentation)

 “Despite their name,Web Services have
      nothing to do with the Web”
                            Frank Leymann
                                  SSAIE 2009
Web Services on the Web


• The Web currently contains 30 billion Web
  pages
 –Nearly 100M active sites
 –10 million new pages added each day

• The Web contains only 28,000 WSDL Web
  services (Seekda.com)
• Verizon have around 4,000
The Ecosystem of APIs and Online
    Data




©Siri (sligthly modified)
The Ecosystem of APIs and Online
    Data




 Over 2000 APIs and 4500 Mashups
   growing at accelerated rate...




©Siri (sligthly modified)
Bringing the Big Think to the Small
Screen




                ©Siri
Semantic Web
  and the
 Web of Data
Semantic Web Principles


• Lift data available on the Web to a level where
  machines can manipulate it in “meaningful ways”
• Adding machine “understandable” annotations
  about Web resources
• All resources are identified by URIs
• Use of Web oriented modeling languages
  • RDF & RDFS
  • OWL (Lite, DL, Full) & OWL2 (EL, QL, RL)
• Use of conceptual models (ontologies,
  vocabularies)
RDF


• Resource Description Framework (RDF) is the HTML of
  the Semantic Web
   – Simple way to describe resources on the Web
   – Based on triples <subject, predicate, object>
   – Defines graphs
RDF Example
RDF Example
RDF Example
RDF Representation


• Several available. Only standard RDF/
  XML
   @prefix ex:   <http://www.example.org/rdf-example#>
   @prefix dc:   <http://purl.org/dc/elements/1.1/>

   ex:Person a rdfs:Class.
   ex:Carlos a ex:Person.

   ex:Doc a rdfs:Class.
   ex:Slide rdfs:subClassOf ex:Doc.
   ex:this a ex:Slide.
   ex:this dc:hasCreator ex:Carlos.
   ...
Ontology and Rule languages


• RDF Schema (RDFS)
  – A simple ontology language on RDF
• Web Ontology Language (OWL) is
  a more expressive ontology language than RDFS
  – Layered language based on Description Logics
     • OWL Lite, OWL DL, OWL Full
     • OWL2 (EL, QL, RL)
• Rule languages
  – Rule Interchange Format (RIF)
  – Extend ontology languages with axioms
SPARQL


• Query language for RDF
• Can be used to express queries across
  diverse data sources
• SPARQL contains capabilities for querying
  required and optional graph patterns along
  with their conjunctions and disjunctions
• The results of SPARQL queries can be
  results sets or RDF graphs
SPARQL Select Example


PREFIX foaf: <http://xmlns.com/foaf/0.1/>
SELECT ?name1 ?name2
 WHERE { ?x foaf:name ?name1 ;
            foaf:mbox ?mbox1 .
         ?y foaf:name ?name2 ;
            foaf:mbox ?mbox2 .
         FILTER (sameTerm(?mbox1, ?mbox2) &&
               !sameTerm(?name1, ?name2))
       }
SPARQL Construct Example

PREFIX foaf:    <http://xmlns.com/foaf/0.1/>
PREFIX vcard:   <http://www.w3.org/2001/vcard-rdf/3.0#>

CONSTRUCT { ?x vcard:N _:v .
            _:v vcard:givenName ?gname .
            _:v vcard:familyName ?fname }
WHERE
 {
    { ?x foaf:firstname ?gname } UNION { ?x foaf:givenname   ?
gname } .
    { ?x foaf:surname   ?fname } UNION { ?x foaf:family_name ?
fname } .
 }
Linked Data

• “Like the web of hypertext, the web of data is constructed with
  documents on the web. However, unlike the web of
  hypertext, where links are relationships anchors in hypertext
  documents written in HTML, for data they links between arbitrary
  things described by RDF. The URIs identify any kind of object or
  concept.”
• Four basic principles:
  1.Use URIs as names for things
  2.Use HTTP URIs so that people can look up those names.
  3.When someone looks up a URI, provide useful information,
    using the standards (RDF, SPARQL)
  4.Include links to other URIs so that they can discover more
    things.

                     Tim Berners-Lee - http://www.w3.org/DesignIssues/LinkedData
Web of Data




Source: http://linkeddata.org/
Linked Services
Integrating Services with the
         Web of Data
Linked Services


• Linked Services are
  Linked Data describing services
• Their inputs, outputs, functionality, etc is
  described using RDF(S) and using existing
  vocabularies
• Consume RDF and produce RDF
• Process layer on top of the Web of Data
Lightweight Semantic Web
               Services

• Existing approaches like OWL-S, WSMO are
  (perceived as) complex in terms of
  – Modeling and Computational complexity
• Web APIs preferred over WSDL Web Services and
  SWS were up to now built on top of WSDL
• Let's try to reduce the complexity
  – Based and built on top of RDF
  – Scale up computationally and promote the uptake
  – WSMO-Lite ontology
• Let's support Web APIs as well
MicroWSMO & WSMO-Lite
Annotating WSDLs
SAWSDL in a Picture
SAWSDL Annotations


• modelReference
 –points to a concept in a semantic model
• loweringSchemaMapping
• liftingSchemaMapping
 –point to data mapping transformation for data
  grounding
Lifting and Lowering


Semantic
level:



Syntactic
level:
WSMO-Lite in SAWSDL

  I     B   F    N
Types of Service Semantics


• Functional                 • Behavioral
  – What the service does      – How the client
                                  talks to the service


• Information model          • Nonfunctional
  – For handling data          – Policies, QoS,
  – Incl. lifting/lowering        price, location etc.
Functional Semantics

• For service discovery, composition
                                                      F
• Category
  – Functionality categorization
  – E.g. eCl@ss
  – Or tagging, folksonomies
• Capability
  – Precondition, Effect
  – Needs using some rule language (WSML, RIF, etc)
Category Example

                     wl:FunctionalClassificationRoot

                               type

     ex:eCommerceService

           subclasses

ex:Travel               ex:Accommodation
ReservationService      ReservationService
Capability Example


ex:RomaHotelReservationPrecondition
   rdf:type wl:Condition ;
   rdf:value """
       ?request
          [ numberOfGuests hasValue ?guests
            and city hasValue ?city ]
          memberOf ReservationData
  and ?guests <= 10
  and ?city = 'Roma'
                         """^^wsml:AxiomLiteral .
Non-functional Semantics


• For ranking and selection                        N
• Not constrained, any ontologies
• Example:

ex:PriceSpecification
     rdfs:subClassOf wl:NonFunctionalParameter .
ex:ReservationFee
     rdf:type ex:PriceSpecification ;
     rdf:value "15"^^ex:euroAmount .
Behavioral Semantics


• For invocation, composition, process mediation         B
• Functionalities on operations
  – Capabilities, categories
• Client selects operation to invoke next
  – Instead of being strictly guided by an explicit process
• Example functional category for operations:
  – Web Architecture: interaction safety
Information Semantics


• For invocation, composition,      I
  data mediation
• Not constrained, any ontologies
• Marked as wl:Ontology
WSMO-Lite Example

<wsdl:description>
  <wsdl:types> <xs:schema>                                              I
     <xs:element name="ReservationRequest"
          sawsdl:modelReference="&ex;Reservation"                       I
          sawsdl:loweringSchemaMapping="&ex;ResMapping.xsparql" … />
  </xs:schema> </wsdl:types>
  <wsdl:interface name="HotelReservations"
          sawsdl:modelReference=
                                                                        F
            "&ex;AccommodationReservationService">
     <wsdl:operation name="searchForRooms"
          sawsdl:modelReference="&wsdlx;SafeInteraction">
                                                                        B
       …
     </wsdl:operation>
     …
  </wsdl:interface>
  <wsdl:service name="RomaHotels" interface="HotelReservations"         F
          sawsdl:modelReference="&ex;RomaHotelReservationPrecondition
                                 &ex;ReservationFee" … />               N
</wsdl:description>
Annotating Web APIs
Reality Check

• Survey based on 222 Web APIs from ProgrammableWeb from 21
  categories
• Types of Web APIs
   – 45.5% REST, RPC 33.8%, Hybrid 20.7%
• 40% of Web APIs do not state the used HTTP method!
• Authentication
   – 80% require authentication (37% use API Key, 14%HTTP Basic,
     6% OAuth, etc)
• Input and Output information
   – 72% do not state the data type of the input parameters
   – 61% use optional parameters, 45% use default values
   – 90% have as output XML, 42% JSON
   – 84% provide example request and 75% example response
What’s the Current State


• Web APIs evolving rapidly and
  autonomously (like the Web)
• No Interface Definition Language adopted
 –WADL is an option but not widely used
 –APIs are described via an HTML Web page
• Allow fast development of mashups
• Little reuse of sofware, high reuse of
  services!
Describing Web APIs

• Machine-readable descriptions useful
  – Tool support for developing clients
  – Service discovery
• No WSDL for Web apps
  – APIs described mostly in text
  – AtomPub has RFC, Service Documents
  – Resources behind AJAX stay undescribed
• Some machine-readable descriptions:
  – HTML links, forms
  – AtomPub service document
  – WADL
hRESTS


• "There's usually an HTML page"
• Identifying machine-readable parts
 –Service, its operations
 –Resource address, HTTP method
 –Input/output data format
• hRESTS microformat
 –Technically, a poshformat
Simpler Example Description

Description of the ACME Hotels service:

The operation getHotelDetails
is invoked using the method GET at
http://example.com/h/{id},
with the ID of the particular hotel replacing
the parameter id. It returns the hotel details
in an ex:hotelInformation document.
Example HTML


<p>Description of the
  ACME Hotels service:</p>
<p>
  The operation <code>getHotelDetails</code> is
  invoked using the method GET
  at <code>http://example.com/h/{id}</code>,
  with the ID of the particular hotel replacing
  the parameter <code>id</code>.
  It returns the hotel details in an
  <code>ex:hotelInformation</code> document.
</p>
Example hRESTS

<div class="service" id="svc">
 <p>Description of the
   <span class="label">ACME Hotels</span> service:</p>
 <div class="operation" id="op1">
  <p>
   The operation <code class="label">getHotelDetails</code> is
   invoked using the method <span class="method">GET</span>
   at <code class="address">http://example.com/h/{id}</code>,
   with <span class="input">the ID of the particular hotel replacing
       the parameter <code>id</code>.</span>
   It returns <span class="output">the hotel details in an
       <code>ex:hotelInformation</code> document.</span>
 </p></div>
</div>
hRESTS


• HTML for RESTful Service Description
• Introduces the service model structure
  – service (+ label)
  – operations (+ address, method)
  – input, output
• Can also be in RDFa
• Basis for extensions:
  – MicroWSMO adds semantic annotations
MicroWSMO


• Extends hRESTS
 –model for model references
 –lifting, lowering
• Applies WSMO-Lite semantics
MicroWSMO

<div class="service" id="svc">
 <p><span class="label">ACME Hotels</span> is a
   <a rel="model" href="…/ecommerce/hotelReservation">
     hotel reservation</a> service.</p> …
 <div class="operation" id="op1"><p> …
   <span class="input">A particular hotel ID replaces the param
     <a rel="model" href="…/onto.owl#Hotel"><code>id</code></
   a>
     (<a rel="lowering" href="…/hotelID.xslt">lowering</a>).
   </span>. …
 </p></div>
</div>
Unified Discovery and
Publication of Services on the
         Web of Data
The Typical High-Level View


           registry

discover              publish
services               descriptions

           invoke
 client                service
                        (provider)
UDDI


• Universal Description, Discovery and Integration
• A Web service registry API specification
  –Business-oriented service publication, discovery
    (initially limited search capabilities)
  –Itself has Web service interface
  –Useful for intranet registries
• A failed public service
  –Not particularly useful discovery support
  –Discontinued in 2006
iServe Architecture   Currently supported by Swift OWLIM
An Open Repository


• Supports access via
 –Web Application - iServe Browser
 –Read&Write RESTful API
 –Linked Data principles
   • SPARQL endpoint
   • Content negotiation (RDF, HTML)
   • All RDF, interlinked with other schemas and
     datasets
• Support for several SWS formalisms

                                                   62
Service Discovery


• Several Mechanisms
 –Simple SPARQL-based
 –Inputs/Outputs logic-based using RDFS
  reasoning
 –Functional Classifications with RDFS reasoning
 –Similarity analysis based on iMatcher
Discovery RESTful API

/data/disco/func-rdfs?class=C1 &class=C2 &...
   uses RDFS functional classification annotations and returns those services
   that are related to all the functional categories Ci (which are URIs).

/data/disco/io-rdfs?f={and|or}&i=C1I &i=C2I &o=C1O &...
   uses ontology annotations of inputs and outputs and returns services for
   which the client has suitable input data (CiI) and/or (depending on the
   parameter f for function) which provide the outputs requested by the client
   (CiO ).

/data/disco/imatch?name=L
   returns all services ranked according to the Levenshtein (other mechanisms
   available) string similarity of the service label with the string L.
Atom-based Discovery


• Discovery mechanisms return an Atom
feed with the results
• Provides Atom feed combinators
  - Union, Intersection, Subtract
http://iserve.kmi.open.ac.uk/data/atom/intersection? f=/
data/disco/func-rdfs?class=
  http://iserve.kmi.open.ac.uk/2010/05/s3eval/func.rdfs
  %2523ProximitySearch &f=/data/disco/io-rdfs?
  o=http://iserve.kmi.open.ac.uk/2010/05/s3eval/data.rdfs
  %2523ATMLocation
Related Tooling
SOA4All Studio
SWEET - MicroWSMO Editor
Related Tooling
SOA4All Studio
SWEET - MicroWSMO Editor
Related Tooling   SOWER - WSMO-Lite Editor

SOA4All Studio
SWEET - MicroWSMO Editor
Related Tooling   SOWER - WSMO-Lite Editor
                  iServe Browser
SOA4All Studio
SWEET - MicroWSMO Editor
Related Tooling   SOWER - WSMO-Lite Editor
                  iServe Browser
SOA4All Studio    Mashups Editor
SWEET - MicroWSMO Editor
Related Tooling   SOWER - WSMO-Lite Editor
                  iServe Browser
SOA4All Studio    Mashups Editor
                  SPICES - Invocation Interface
Thanks
   More Material at
http://www.soa4all.eu/
References


• SAWSDL
  – http://www.w3.org/2002/ws/sawsdl/
• WSMO-Lite
  – http://cms-wg.sti2.org/TR/d11/v0.2/
• hRESTS & MicroWSMO
  – http://cms-wg.sti2.org/TR/d12
• REST & RESTful Web services
  – http://en.wikipedia.org/wiki/REST
• Microformats
  – http://microformats.org/
References

• SPARQL
  – http://www.w3.org/TR/rdf-sparql-query/
• WSMO
  – http://www.wsmo.org and http://cms-wg.sti2.org
• OWL-S
  – http://www.daml.org/services/owl-s/
• SWSF & FLOWS
  – http://www.w3.org/Submission/SWSF/
• WSDL-S
  – http://www.w3.org/Submission/WSDL-S/
References

• WSMX
   – http://www.wsmx.org/
• IRS-III
   – http://technologies.kmi.open.ac.uk/irs/
• METEOR-S
   – http://lsdis.cs.uga.edu/projects/meteor-s/
• Glue
   – http://glue.cefriel.it/
• OWL-S VM
   – http://projects.semwebcentral.org/projects/owl-s-vm/
Acknowledgements


•   Jacek Kopecký, The Open University
•   Reto Krummenacher, University of Innsbruck
•   John Domingue, The Open University
•   Maria Maleshkova, The Open University
•   Dong Liu, The Open University
•   Dave Lambert, The Open University
•   2 Slides from Tom Gruber (Siri)

Linked services

  • 1.
    Linked Services Dr.Carlos Pedrinaci The Open University SSAIE 2010, Heraklion
  • 2.
    Outline • Web Servicesor Services on the Web? • The Semantic Web and the Web of Data • Linked Services - Integrating Services with the Web of Data –Annotating WSDLs –Annotating Web APIs • Unified Discovery and Publication on the Web of Data
  • 3.
    Preparation for Hands-On •The material shown in this session will be the basis for the hands-on session afterwards • You’ll need Firefox • Tabulator extension for Firefox –http://dig.csail.mit.edu/2007/tab/
  • 4.
    Web Services or Services on the Web?
  • 5.
    Web Services • Largenumber of standards and implementations – WSDL, BPEL, WS-Coordination, WS- Transaction, WS-AtomicTransaction, WS- (see Cesare’s presentation) “Despite their name,Web Services have nothing to do with the Web” Frank Leymann SSAIE 2009
  • 6.
    Web Services onthe Web • The Web currently contains 30 billion Web pages –Nearly 100M active sites –10 million new pages added each day • The Web contains only 28,000 WSDL Web services (Seekda.com) • Verizon have around 4,000
  • 7.
    The Ecosystem ofAPIs and Online Data ©Siri (sligthly modified)
  • 8.
    The Ecosystem ofAPIs and Online Data Over 2000 APIs and 4500 Mashups growing at accelerated rate... ©Siri (sligthly modified)
  • 9.
    Bringing the BigThink to the Small Screen ©Siri
  • 12.
    Semantic Web and the Web of Data
  • 13.
    Semantic Web Principles •Lift data available on the Web to a level where machines can manipulate it in “meaningful ways” • Adding machine “understandable” annotations about Web resources • All resources are identified by URIs • Use of Web oriented modeling languages • RDF & RDFS • OWL (Lite, DL, Full) & OWL2 (EL, QL, RL) • Use of conceptual models (ontologies, vocabularies)
  • 14.
    RDF • Resource DescriptionFramework (RDF) is the HTML of the Semantic Web – Simple way to describe resources on the Web – Based on triples <subject, predicate, object> – Defines graphs
  • 15.
  • 16.
  • 17.
  • 18.
    RDF Representation • Severalavailable. Only standard RDF/ XML @prefix ex: <http://www.example.org/rdf-example#> @prefix dc: <http://purl.org/dc/elements/1.1/> ex:Person a rdfs:Class. ex:Carlos a ex:Person. ex:Doc a rdfs:Class. ex:Slide rdfs:subClassOf ex:Doc. ex:this a ex:Slide. ex:this dc:hasCreator ex:Carlos. ...
  • 19.
    Ontology and Rulelanguages • RDF Schema (RDFS) – A simple ontology language on RDF • Web Ontology Language (OWL) is a more expressive ontology language than RDFS – Layered language based on Description Logics • OWL Lite, OWL DL, OWL Full • OWL2 (EL, QL, RL) • Rule languages – Rule Interchange Format (RIF) – Extend ontology languages with axioms
  • 20.
    SPARQL • Query languagefor RDF • Can be used to express queries across diverse data sources • SPARQL contains capabilities for querying required and optional graph patterns along with their conjunctions and disjunctions • The results of SPARQL queries can be results sets or RDF graphs
  • 21.
    SPARQL Select Example PREFIXfoaf: <http://xmlns.com/foaf/0.1/> SELECT ?name1 ?name2 WHERE { ?x foaf:name ?name1 ; foaf:mbox ?mbox1 . ?y foaf:name ?name2 ; foaf:mbox ?mbox2 . FILTER (sameTerm(?mbox1, ?mbox2) && !sameTerm(?name1, ?name2)) }
  • 22.
    SPARQL Construct Example PREFIXfoaf: <http://xmlns.com/foaf/0.1/> PREFIX vcard: <http://www.w3.org/2001/vcard-rdf/3.0#> CONSTRUCT { ?x vcard:N _:v . _:v vcard:givenName ?gname . _:v vcard:familyName ?fname } WHERE { { ?x foaf:firstname ?gname } UNION { ?x foaf:givenname ? gname } . { ?x foaf:surname ?fname } UNION { ?x foaf:family_name ? fname } . }
  • 23.
    Linked Data • “Likethe web of hypertext, the web of data is constructed with documents on the web. However, unlike the web of hypertext, where links are relationships anchors in hypertext documents written in HTML, for data they links between arbitrary things described by RDF. The URIs identify any kind of object or concept.” • Four basic principles: 1.Use URIs as names for things 2.Use HTTP URIs so that people can look up those names. 3.When someone looks up a URI, provide useful information, using the standards (RDF, SPARQL) 4.Include links to other URIs so that they can discover more things. Tim Berners-Lee - http://www.w3.org/DesignIssues/LinkedData
  • 24.
    Web of Data Source:http://linkeddata.org/
  • 25.
  • 30.
    Linked Services • LinkedServices are Linked Data describing services • Their inputs, outputs, functionality, etc is described using RDF(S) and using existing vocabularies • Consume RDF and produce RDF • Process layer on top of the Web of Data
  • 31.
    Lightweight Semantic Web Services • Existing approaches like OWL-S, WSMO are (perceived as) complex in terms of – Modeling and Computational complexity • Web APIs preferred over WSDL Web Services and SWS were up to now built on top of WSDL • Let's try to reduce the complexity – Based and built on top of RDF – Scale up computationally and promote the uptake – WSMO-Lite ontology • Let's support Web APIs as well
  • 32.
  • 33.
  • 34.
    SAWSDL in aPicture
  • 35.
    SAWSDL Annotations • modelReference –points to a concept in a semantic model • loweringSchemaMapping • liftingSchemaMapping –point to data mapping transformation for data grounding
  • 36.
  • 37.
  • 38.
    Types of ServiceSemantics • Functional • Behavioral – What the service does – How the client talks to the service • Information model • Nonfunctional – For handling data – Policies, QoS, – Incl. lifting/lowering price, location etc.
  • 39.
    Functional Semantics • Forservice discovery, composition F • Category – Functionality categorization – E.g. eCl@ss – Or tagging, folksonomies • Capability – Precondition, Effect – Needs using some rule language (WSML, RIF, etc)
  • 40.
    Category Example wl:FunctionalClassificationRoot type ex:eCommerceService subclasses ex:Travel ex:Accommodation ReservationService ReservationService
  • 41.
    Capability Example ex:RomaHotelReservationPrecondition rdf:type wl:Condition ; rdf:value """ ?request [ numberOfGuests hasValue ?guests and city hasValue ?city ] memberOf ReservationData and ?guests <= 10 and ?city = 'Roma' """^^wsml:AxiomLiteral .
  • 42.
    Non-functional Semantics • Forranking and selection N • Not constrained, any ontologies • Example: ex:PriceSpecification rdfs:subClassOf wl:NonFunctionalParameter . ex:ReservationFee rdf:type ex:PriceSpecification ; rdf:value "15"^^ex:euroAmount .
  • 43.
    Behavioral Semantics • Forinvocation, composition, process mediation B • Functionalities on operations – Capabilities, categories • Client selects operation to invoke next – Instead of being strictly guided by an explicit process • Example functional category for operations: – Web Architecture: interaction safety
  • 44.
    Information Semantics • Forinvocation, composition, I data mediation • Not constrained, any ontologies • Marked as wl:Ontology
  • 45.
    WSMO-Lite Example <wsdl:description> <wsdl:types> <xs:schema> I <xs:element name="ReservationRequest" sawsdl:modelReference="&ex;Reservation" I sawsdl:loweringSchemaMapping="&ex;ResMapping.xsparql" … /> </xs:schema> </wsdl:types> <wsdl:interface name="HotelReservations" sawsdl:modelReference= F "&ex;AccommodationReservationService"> <wsdl:operation name="searchForRooms" sawsdl:modelReference="&wsdlx;SafeInteraction"> B … </wsdl:operation> … </wsdl:interface> <wsdl:service name="RomaHotels" interface="HotelReservations" F sawsdl:modelReference="&ex;RomaHotelReservationPrecondition &ex;ReservationFee" … /> N </wsdl:description>
  • 46.
  • 47.
    Reality Check • Surveybased on 222 Web APIs from ProgrammableWeb from 21 categories • Types of Web APIs – 45.5% REST, RPC 33.8%, Hybrid 20.7% • 40% of Web APIs do not state the used HTTP method! • Authentication – 80% require authentication (37% use API Key, 14%HTTP Basic, 6% OAuth, etc) • Input and Output information – 72% do not state the data type of the input parameters – 61% use optional parameters, 45% use default values – 90% have as output XML, 42% JSON – 84% provide example request and 75% example response
  • 48.
    What’s the CurrentState • Web APIs evolving rapidly and autonomously (like the Web) • No Interface Definition Language adopted –WADL is an option but not widely used –APIs are described via an HTML Web page • Allow fast development of mashups • Little reuse of sofware, high reuse of services!
  • 49.
    Describing Web APIs •Machine-readable descriptions useful – Tool support for developing clients – Service discovery • No WSDL for Web apps – APIs described mostly in text – AtomPub has RFC, Service Documents – Resources behind AJAX stay undescribed • Some machine-readable descriptions: – HTML links, forms – AtomPub service document – WADL
  • 50.
    hRESTS • "There's usuallyan HTML page" • Identifying machine-readable parts –Service, its operations –Resource address, HTTP method –Input/output data format • hRESTS microformat –Technically, a poshformat
  • 51.
    Simpler Example Description Descriptionof the ACME Hotels service: The operation getHotelDetails is invoked using the method GET at http://example.com/h/{id}, with the ID of the particular hotel replacing the parameter id. It returns the hotel details in an ex:hotelInformation document.
  • 52.
    Example HTML <p>Description ofthe ACME Hotels service:</p> <p> The operation <code>getHotelDetails</code> is invoked using the method GET at <code>http://example.com/h/{id}</code>, with the ID of the particular hotel replacing the parameter <code>id</code>. It returns the hotel details in an <code>ex:hotelInformation</code> document. </p>
  • 53.
    Example hRESTS <div class="service"id="svc"> <p>Description of the <span class="label">ACME Hotels</span> service:</p> <div class="operation" id="op1"> <p> The operation <code class="label">getHotelDetails</code> is invoked using the method <span class="method">GET</span> at <code class="address">http://example.com/h/{id}</code>, with <span class="input">the ID of the particular hotel replacing the parameter <code>id</code>.</span> It returns <span class="output">the hotel details in an <code>ex:hotelInformation</code> document.</span> </p></div> </div>
  • 54.
    hRESTS • HTML forRESTful Service Description • Introduces the service model structure – service (+ label) – operations (+ address, method) – input, output • Can also be in RDFa • Basis for extensions: – MicroWSMO adds semantic annotations
  • 55.
    MicroWSMO • Extends hRESTS –model for model references –lifting, lowering • Applies WSMO-Lite semantics
  • 56.
    MicroWSMO <div class="service" id="svc"> <p><span class="label">ACME Hotels</span> is a <a rel="model" href="…/ecommerce/hotelReservation"> hotel reservation</a> service.</p> … <div class="operation" id="op1"><p> … <span class="input">A particular hotel ID replaces the param <a rel="model" href="…/onto.owl#Hotel"><code>id</code></ a> (<a rel="lowering" href="…/hotelID.xslt">lowering</a>). </span>. … </p></div> </div>
  • 57.
    Unified Discovery and Publicationof Services on the Web of Data
  • 58.
    The Typical High-LevelView registry discover publish services descriptions invoke client service (provider)
  • 59.
    UDDI • Universal Description,Discovery and Integration • A Web service registry API specification –Business-oriented service publication, discovery (initially limited search capabilities) –Itself has Web service interface –Useful for intranet registries • A failed public service –Not particularly useful discovery support –Discontinued in 2006
  • 65.
    iServe Architecture Currently supported by Swift OWLIM
  • 66.
    An Open Repository •Supports access via –Web Application - iServe Browser –Read&Write RESTful API –Linked Data principles • SPARQL endpoint • Content negotiation (RDF, HTML) • All RDF, interlinked with other schemas and datasets • Support for several SWS formalisms 62
  • 67.
    Service Discovery • SeveralMechanisms –Simple SPARQL-based –Inputs/Outputs logic-based using RDFS reasoning –Functional Classifications with RDFS reasoning –Similarity analysis based on iMatcher
  • 68.
    Discovery RESTful API /data/disco/func-rdfs?class=C1&class=C2 &... uses RDFS functional classification annotations and returns those services that are related to all the functional categories Ci (which are URIs). /data/disco/io-rdfs?f={and|or}&i=C1I &i=C2I &o=C1O &... uses ontology annotations of inputs and outputs and returns services for which the client has suitable input data (CiI) and/or (depending on the parameter f for function) which provide the outputs requested by the client (CiO ). /data/disco/imatch?name=L returns all services ranked according to the Levenshtein (other mechanisms available) string similarity of the service label with the string L.
  • 69.
    Atom-based Discovery • Discoverymechanisms return an Atom feed with the results • Provides Atom feed combinators - Union, Intersection, Subtract http://iserve.kmi.open.ac.uk/data/atom/intersection? f=/ data/disco/func-rdfs?class= http://iserve.kmi.open.ac.uk/2010/05/s3eval/func.rdfs %2523ProximitySearch &f=/data/disco/io-rdfs? o=http://iserve.kmi.open.ac.uk/2010/05/s3eval/data.rdfs %2523ATMLocation
  • 70.
  • 71.
    SWEET - MicroWSMOEditor Related Tooling SOA4All Studio
  • 72.
    SWEET - MicroWSMOEditor Related Tooling SOWER - WSMO-Lite Editor SOA4All Studio
  • 73.
    SWEET - MicroWSMOEditor Related Tooling SOWER - WSMO-Lite Editor iServe Browser SOA4All Studio
  • 74.
    SWEET - MicroWSMOEditor Related Tooling SOWER - WSMO-Lite Editor iServe Browser SOA4All Studio Mashups Editor
  • 75.
    SWEET - MicroWSMOEditor Related Tooling SOWER - WSMO-Lite Editor iServe Browser SOA4All Studio Mashups Editor SPICES - Invocation Interface
  • 76.
    Thanks More Material at http://www.soa4all.eu/
  • 77.
    References • SAWSDL – http://www.w3.org/2002/ws/sawsdl/ • WSMO-Lite – http://cms-wg.sti2.org/TR/d11/v0.2/ • hRESTS & MicroWSMO – http://cms-wg.sti2.org/TR/d12 • REST & RESTful Web services – http://en.wikipedia.org/wiki/REST • Microformats – http://microformats.org/
  • 78.
    References • SPARQL – http://www.w3.org/TR/rdf-sparql-query/ • WSMO – http://www.wsmo.org and http://cms-wg.sti2.org • OWL-S – http://www.daml.org/services/owl-s/ • SWSF & FLOWS – http://www.w3.org/Submission/SWSF/ • WSDL-S – http://www.w3.org/Submission/WSDL-S/
  • 79.
    References • WSMX – http://www.wsmx.org/ • IRS-III – http://technologies.kmi.open.ac.uk/irs/ • METEOR-S – http://lsdis.cs.uga.edu/projects/meteor-s/ • Glue – http://glue.cefriel.it/ • OWL-S VM – http://projects.semwebcentral.org/projects/owl-s-vm/
  • 80.
    Acknowledgements • Jacek Kopecký, The Open University • Reto Krummenacher, University of Innsbruck • John Domingue, The Open University • Maria Maleshkova, The Open University • Dong Liu, The Open University • Dave Lambert, The Open University • 2 Slides from Tom Gruber (Siri)

Editor's Notes

  • #33 WSMO-Lite ontology of service semantics describes services for SWS automation SAWSDL puts pointers to WSMO-Lite semantics in WSDL MicroWSMO and hRESTS are lightweight equivalents for SAWSDL and WSDL for RESTful services
  • #38 WSDL has more detail than our simplified service model, therefore there are more ways of attaching semantics. Information semantics can be anywhere in the schema inside the types section, functional semantics can be either on the interface (general, reusable) or on the service (specific), and nonfunctional parameters can be on a binding (general, reusable) or on the service (specific).
  • #59 Lifecycle: Service provider creates the Web service, publishes its (WSDL) description in a registry (UDDI). A client discovers suitable Web services for its application. The client invokes the discovered service(s) as appropriate using SOAP.