1957ee7d6c86a6cf532a1ad8d4e8e338.ppt
- Количество слайдов: 55
Semantic Web Services Light weight Annotations 1 Copyright 2010 Dieter Fensel, Jacek Kopecky and Srdjan Komazec ©
Where are we? # 1 Introduction 2 Web Science 3 Service Science 4 Web services 5 Web 2. 0 services 6 Semantic Web 7 Web Service Modeling Ontology (WSMO) 8 Web Service Modeling Language (WSML) 9 Web Service Execution Environment (WSMX) 10 OWL S and other 11 Light-weight Annotations 12 Applications 13 2 Title Mobile Services
Outline • Motivation • Technical solution – WSMO Lite Service semantics – SAWSDL, WSMO Lite – h. RESTS, Micro. WSMO • • 3 Illustration by a larger example Summary Further Development References 3
MOTIVATION 4
Motivation • The vision of Semantic Web Services (SWS) – Automating typical Web Service usage tasks. – Resolving heterogeneities issues. – Fostering scalability. • Existing SWS approaches – WSMO, OWL S, SWSF – Addressing the aforementioned problems. , but they are considered as – – 5 Heavyweight solutions. Introducing new languages founded on a expressive formalisms. Promoting the top down modeling approach (semantics first). Grounded usually in WSDL based services.
Motivation • Need for lightweight service ontologies. • Directly built on top of the newest W 3 C standards – RDF(S), OWL, SAWSDL • Promoting the bottom up modeling approach – Augmentation of existing service specifications with semantic descriptions. • Covering the other grounding approaches (i. e. , REST) – WSDL based services • 23757 services and 8094 providers according to Service Finder 1 • Many of them are used for the intra enterprise integration – RESTful based services • 68% RESTful services vs. 19% SOAP services 2 ? ! • Currently the dominant approach to offer services over the Web 1 Statistics retrieved from the Service Finder demo on Dec 17 th, 2009 @ http: //demo. service finder. eu/statistics 2 Statistics retrieved from the Programmable Web on Dec 17 th, 2009 @ http: //www. programmableweb. com/apis 6
Motivation 1. SAWSDL – – Semantic Annotations for WSDL and XML Schema New W 3 C standard Building on top of WSDL, URIs Assuming RDF, OWL 2. Lightweight SWS approaches – – – 7 WSMO modularized Key pieces of service semantics Simple semantic representation 7
TECHNICAL SOLUTION 8
Technical Solution Overview 9
TECHNICAL SOLUTION SAWSDL - AUGMENTING WSDL WITH THE SEMANTIC DESCRIPTIONS 10
WSDL Overview • Web Service Description Language – Interface Definition Language (IDL) for Web Services • Current version: 2. 0 @ W 3 C – Version 1. 1 still in widespread use • Interface – reusable, abstract – Operations with MEPs • Binding – reusable, concrete • Service implements an interface – Endpoints use bindings 11
SAWSDL Overview • How to add semantic annotations to various parts of a WSDL document – Input and output message structures, interfaces and operations. • Relying to simple extension attributes – Compliant to WSDL v 2. 0 and v 1. 1, and XML Schema • Annotations can be used for various purposes: – WSDL interfaces and operations with categorization information used to advertise Web services – XML Schema types to foster discovery and composition – Specifying the data mapping of XML Schema to/from an ontology used during invocation (possible mediation) • Independent on the ontology expression language and mapping languages 12
SAWSDL Extension attributes • Extension attributes of SAWSDL are: – model. Reference • Pointers to a concept in some semantic model. • Annotates XML Schema type definitions, element declarations, and attribute declarations, WSDL interfaces, operations, and faults. – lifting. Schema. Mapping • Added to XML Schema element declarations and type definitions for specifying lifting mappings between semantic data and XML. – lowering. Schema. Mapping • Added to XML Schema element declarations and type definitions for specifying lowering mappings between semantic data and XML. • Multiple semantic annotations to be associated with WSDL element. • Schema mappings and a model references can contain multiple pointers. 13
SAWSDL Lifting/Lowering Semantic level: Syntactic level: 14
SAWSDL An example <wsdl: description target. Namespace="http: //www. w 3. org/2002/ws/sawsdl/spec/wsdl/order#" xmlns: wsdl="http: //www. w 3. org/ns/wsdl" xmlns: xs="http: //www. w 3. org/2001/XMLSchema" xmlns: sawsdl=“http: //www. w 3. org/ns/sawsdl”> <wsdl: types> <xs: schema target. Namespace="http: //www. w 3. org/2002/ws/sawsdl/spec/wsdl/order#” element. Form. Default="qualified”> <xs: element name="Order. Request” sawsdl: model. Reference="http: //www. w 3. org/2002/ws/sawsdl/spec/ontology/purchaseorder#Order. Request" sawsdl: lowering. Schema. Mapping="http: //www. w 3. org/2002/ws/sawsdl/spec/mapping/RDFOnt 2 Request. xml" > <xs: complex. Type> <xs: sequence> <xs: element name="customer. No" type="xs: integer" /> <xs: element name="order. Item" type="item" min. Occurs="1" max. Occurs="unbounded" /> </xs: sequence> </xs: complex. Type> </xs: element> … <xs: element name="Order. Response" type="confirmation" /> <xs: simple. Type name="confirmation” sawsdl: model. Reference="http: //www. w 3. org/2002/ws/sawsdl/spec/ontology/purchaseorder#Order. Confirmation" > <xs: restriction base="xs: string”> <xs: enumeration value="Confirmed" /> <xs: enumeration value="Pending" /> <xs: enumeration value="Rejected" /> </xs: restriction> </xs: simple. Type> </xs: schema> </wsdl: types> <wsdl: interface name="Order” sawsdl: model. Reference="http: //example. org/categorization/products/electronics" > <wsdl: operation name="order" pattern=" http: //www. w 3. org/ns/wsdl/in-out " sawsdl: model. Reference="http: //www. w 3. org/2002/ws/sawsdl/spec/ontology/purchaseorder#Request. Purchase. Order" > <wsdl: input element="Order. Request" /> <wsdl: output element="Order. Response" /> </wsdl: operation> </wsdl: interface> </wsdl: description> 15
TECHNICAL SOLUTION WSMO-LITE 16
WSMO-Lite Introduction • Lightweight semantic descriptions for services on the Web – Filling the SAWSDL annotations with concrete semantic service descriptions. • Working draft of CMS Working Group, v 0. 3 • Inspired by WSMO ontology – Focusing on a subset. – Defining gradual extension of SAWSDL. • Addresses following requirements: – Identifies types and simple vocabulary for semantic description of services and languages used to express descriptions. – Defines an annotation mechanism for WSDL – Provides a bridge between WSDL, SAWSDL and existing domain specific ontologies such as classification schemas, etc. 17
WSMO-Lite Types of Service Semantics F • Functional – What the service does I • Information model – For handling data – Incl. lifting/lowering 18 B • Behavioral – How the client talks to the service N • Nonfunctional – Policies, Qo. S, price, location etc.
WSMO-Lite Semantics in Service Model F N B I Web service Operation 1 Operation 2 . . . Operation N 19 input output
WSMO-Lite Functional Semantics • For service discovery, composition • Category – Functionality categorization – E. g. e. Cl@ss, UDDI – Or tagging, folksonomies • Capability – Precondition, Effect – Using WSML rule languages 20 F
WSMO-Lite Category Example wl: Functional. Classification. Root type ex: e. Commerce. Service subclasses ex: Travel ex: Accommodation Reservation. Service 21
WSMO-Lite Category Example (RDF) ex: e. Commerce. Service rdf: type wl: Functional. Classification. Root. ex: Travel. Reservation. Service rdfs: sub. Class. Of ex: e. Commerce. Service. ex: Accommodation. Reservation. Service rdfs: sub. Class. Of ex: e. Commerce. Service. … 22
WSMO-Lite Capability Example ex: Roma. Hotel. Reservation. Precondition rdf: type wl: Condition ; rdf: value """ ? request [ number. Of. Guests has. Value ? guests and city has. Value ? city ] member. Of Reservation. Data and ? guests <= 10 and ? city = 'Roma' """^^wsml: Axiom. Literal. 23
WSMO-Lite Nonfunctional Semantics • For ranking and selection • Not constrained, any ontologies • Example: ex: Price. Specification rdfs: sub. Class. Of wl: Non. Functional. Parameter. ex: Reservation. Fee rdf: type ex: Price. Specification ; rdf: value "15"^^ex: euro. Amount. 24 N
WSMO-Lite 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. Arch interaction safety 25
WSMO-Lite Information Semantics • For invocation, composition, data mediation • Not constrained, any ontologies • Refer to course Semantic Web 26 I
WSMO-Lite The ontology expressed in RDFS @prefix rdfs: <http: //www. w 3. org/2000/01/rdf−schema#>. rdf: <http: //www. w 3. org/1999/02/22−rdf−syntax−ns#>. owl: <http: //www. w 3. org/2002/07/owl#>. wsl: <http: //www. wsmo. org/ns/wsmo−lite#>. wsl: Ontology a rdfs: Class; rdfs: sub. Class. Of owl: Ontology. wsl: Functional. Classification. Root rdfs: sub. Class. Of rdfs: Class. wsl: Non. Functional. Parameter a rdfs: Class. wsl: Condition a rdfs: Class. wsl: Effect a rdfs: Class. 27
WSMO-Lite Service Semantics Summary wl: Ontology wl: Functional. Classification. Root wl: Condition > together form a Capability wl: Effect wl: Non. Functional. Parameter Different types of semantics on one component: – E. g. functionality and nonfunc. property on a service 28
TECHNICAL SOLUTION WSMO-LITE IN SAWSDL 29
WSDL 30
SAWSDL But: no predefined semantics! 31
WSMO-Lite in SAWSDL I 32 B F N
WSMO-Lite Example <wsdl: description> <wsdl: types> <xs: schema> <xs: element name="Reservation. Request" sawsdl: model. Reference="&ex; Reservation" sawsdl: lowering. Schema. Mapping="&ex; Res. Mapping. xsparql" … /> </xs: schema> </wsdl: types> <wsdl: interface name="Hotel. Reservations" sawsdl: model. Reference= "&ex; Accommodation. Reservation. Service"> <wsdl: operation name="search. For. Rooms" sawsdl: model. Reference="&wsdlx; Safe. Interaction"> … </wsdl: operation> … </wsdl: interface> <wsdl: service name="Roma. Hotels" interface="Hotel. Reservations" sawsdl: model. Reference="&ex; Roma. Hotel. Reservation. Precondition &ex; Reservation. Fee" … /> </wsdl: description> 33 I I F B F N
TECHNICAL SOLUTION HRESTS AND MICROWSMO 34
h. RESTS and Micro. WSMO RESTful Web Service Recap • A RESTful Web service is: – A set of Web resources – Interacting with GET/POST/PUT/DELETE – Interlinked – Data centric, not functionality centric – Machine oriented 35
h. RESTS and Micro. WSMO RESTful Web Services Hotel booking service description search results hotel info payment my bookings 36 confirmation
h. RESTS and Micro. WSMO Hypermedia Operations search(date, city) list of hotels & rates get. Hotel. Details(hotel) reserve(rate, credit. Card) confirmation. ID get. Confirmation. Details(conf. ID) list. My. Bookings() list of confirmation. IDs nouns vs. verbs 37
h. RESTS and Micro. WSMO Hypermedia Operations Web service RESTful service resource input Operation 1 resource input Operation 2 . . . resource output input Operation N output 38
h. RESTS and Micro. WSMO h. RESTS Overview • "There's usually an HTML page" – There's no WSDL for Web apps – APIs described mostly in text • Identifying machine readable parts – Service, its operations – Resource address, HTTP method – Input/output data format • h. RESTS microformat 39
h. RESTS and Micro. WSMO h. RESTS • HTML for RESTful Service Description • Introduces the service model structure – service (+ label) – operations (+ address, method) – input, output • Basis for extensions: – Micro. WSMO adds semantic annotations 40
h. RESTS and Micro. WSMO Example Description of the ACME Hotels service: The operation get. Hotel. Details 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: hotel. Information document. 41
h. RESTS and Micro. WSMO Example HTML <p>Description of the ACME Hotels service: </p> <p> The operation <code>get. Hotel. Details</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: hotel. Information</code> document. </p> 42
h. RESTS and Micro. WSMO Example h. RESTS <div class="service" id="svc"> <p>Description of the <span class="label">ACME Hotels</span> service: </p> <div class="operation" id="op 1"> <p> The operation <code class="label">get. Hotel. Details</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: hotel. Information</code> document. </span> </p></div> 43
h. RESTS and Micro. WSMO • Extends h. RESTS – model for model references – lifting, lowering • Place for WSMO Lite semantics 44
h. RESTS and Micro. WSMO <div class="service" id="svc"> <p><span class="label">ACME Hotels</span> is a <a rel="model" href="&ex; Accommodation. Reservation. Service"> hotel reservation</a> service. </p> … <div class="operation" id="op 1"><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="…/hotel. ID. xsparql">lowering</a>). </span>. … </p></div> 45
h. RESTS and Micro. WSMO Semantics Implied in Web • Hypermedia behavioral semantics – Links become available through interaction • Uniform interface behavioral semantics – GET, PUT, DELETE have known effects – GET is safe, PUT and DELETE idempotent – POST has no implied semantics • Self description information model – Operation output data can specify what it is • GRDDL, other semantic annotations 46
ILLUSTRATION BY A LARGER EXAMPLE 47
Example WSMO-Lite @prefix @prefix rdfs: <http: //www. w 3. org/2000/01/rdf−schema#>. rdf: <http: //www. w 3. org/1999/02/22−rdf−syntax−ns#>. wsl: <http: //www. wsmo. org/ns/wsmo−lite#>. ex: <http: //example. org/onto#>. xs: <http: //www. w 3. org/2001/XMLSchema#>. wsml: <http: //www. wsmo. org/wsml−syntax#>. <> a wsl: Ontology. ex: Customer a rdfs: Class. ex: has. Service a rdf: Property ; rdfs: domain ex: Customer ; rdfs: range ex: Service a rdfs: Class. ex: has. Connection a rdf: Property ; rdfs: domain ex: Customer ; rdfs: range ex: Network. Connection a rdfs: Class. ex: provides. Bandwidth a rdf: Property ; rdfs: domain ex: Network. Connection ; rdfs: range xs: integer. ex: Video. On. Demand. Service rdfs: sub. Class. Of ex: Service. ex: Video. On. Demand. Subscription. Precondition a wsl: Condition ; rdf: value ””” ? customer[ex#has. Connection has. Value ? connection]member. Of ex#Customer and ? connection[ex#provides. Bandwidth has. Value ? y]member. Of ex#Network. Connection and ? y > 1000”””ˆˆwsml: Axiom. Literal. … 48
Example WSMO-Lite … ex: Video. On. Demand. Subscription. Effect a wsl: Effect ; rdf: value ””” ? customer[ex#has. Service has. Value ? service]member. Of ex#Customer and ? service member. Of Video. On. Demand. Subscription”””ˆˆwsml: Axiom. Literal a rdfs: Datatype. ex: Price. Specification rdfs: sub. Class. Of wsl: Non. Functional. Parameter. ex: Video. On. Demand. Price a ex: Price. Specification ; ex: price. Per. Change ” 30”ˆˆex: euro. Amount ; ex: installation. Price ” 49”ˆˆex: euro. Amount. ex: Subscription. Service a wsl: Functional. Classification. Root. ex: Video. Subscription. Service rdfs: sub. Class. Of ex: Subscription. Service. ex: News. Subscription. Service rdfs: sub. Class. Of ex: Subscription. Service. 49
SUMMARY 50
Summary • Building on SAWSDL – WSMO-Lite semantics – Both for WS- and RESTful services • Bottom-up annotations – Based on tech already known by WS people – WSDL and HTML • Modular descriptions – Only use what you need 51
Further Developments • Implementation: WSMO Lite and Micro. WSMO automation – SOA 4 All Studio – WSMX • Tool support for service annotation – SOA 4 All Studio and others • Standardization of WSMO Lite 52
References • Mandatory reading: – J. Kopecky , T. Vitvar , C. Bournez , J. Farrell: SAWSDL: Semantic Annotations for WSDL and XML Schema, IEEE Internet Computing, IEEE CS Press, 2007, 11 (6). – J. Kopecky , K. Gomadam , T. Vitvar: h. RESTS: an HTML Microformat for Describing RESTful Web Services, The 2008 IEEE/WIC/ACM International Conference on Web Intelligence (WI 2008), IEEE CS Press, November, 2008, Sydney, Australia. – T. Vitvar , J. Kopecky , J. Viskova , D. Fensel: WSMO Lite Annotations for Web Services , The 5 th European Semantic Web Conference 2008 , Springer, June, 2008, Tenerife, Spain. – SAWSDL: http: //w 3. org/TR/sawsdl – WSMO Lite: http: //cms wg. sti 2. org/TR/d 11 – h. RESTS & Micro. WSMO: http: //cms wg. sti 2. org/TR/d 12 • Further reading: – RDFS: • Wikipedia links: – REST: 53 http: //w 3. org/TR/rdf primer http: //w 3. org/TR/rdf schema http: //en. wikipedia. org/wiki/REST
Next Lecture # 1 Introduction 2 Web Science 3 Service Science 4 Web services 5 Web 2. 0 services 6 Semantic Web 7 Web Service Modeling Ontology (WSMO) 8 Web Service Modeling Language (WSML) 9 Web Service Execution Environment (WSMX) 10 OWL S and other 11 Light weight Annotations 12 Applications 13 54 Title Mobile Services
Questions? 55
1957ee7d6c86a6cf532a1ad8d4e8e338.ppt