semantic web - sharifce.sharif.edu/.../lecturenotes/12-mortezaamini-semanticwebservices.… ·...
TRANSCRIPT
���ه �عا�ی
Semantic Web
Morteza Amini
Semantic Web Services
Sharif University of Technology Fall 95-96
Outline
Semantic Web Services Basics
Challenges in Web Services
Semantics in Web Services
Web Service Modeling Ontology
Sharif Univ. of Tech. Semantic Web Services - Morteza Amini 2
Outline
Semantic Web Services Basics
Challenges in Web Services
Semantics in Web Services
Web Service Modeling Ontology
Sharif Univ. of Tech. Semantic Web Services - Morteza Amini 3
The World Wide Web
Largest document repository ever (> 25 billion Web pages indexed by Google)
Highly distributed Millions of publishers No control over consistency of published content
Web Technologies HTTP for transferring documents HTML for marking up documents URI for addressing documents
Most content on the Web is in natural language (HTML) Natural language not suitable for machine reading Current Web is “syntactic" Problems in automatically:
Retrieving documents Extracting relevant information from retrieved documents Combining information from different sources
Sharif Univ. of Tech. Semantic Web Services - Morteza Amini 5
The Semantic Web
Making the Web machine-readable.
Publishing data in machine-readable format.
Relating data on the Web to established vocabularies (ontologies).
Ontologies specified in formal language to allow reasoning.
Ontologies enable automation in: Retrieval of relevant information. Extracting relevant information from retrieved document. Combination of information from different sources (as long as they
are related to the same ontology.
Sharif Univ. of Tech. Semantic Web Services - Morteza Amini 6
Web Services
Next step in software engineering: 1960s: Procedural languages 1980s: Object Orientation 1990s: Component Orientation 2000s: Web Services
Loosely coupled, reusable components.
Add new level of functionality on top of the current Web.
Web Service Technologies SOAP for accessing Web Services WSDL for describing Web Services UDDI for publishing and looking up Web Services
Sharif Univ. of Tech. Semantic Web Services - Morteza Amini 7
Web Services Are Not Enough
Like the current Web, Web Services are "syntactic“.
No automation in: Finding services Selecting services Negotiation with service provider Composing services Executing services
Sharif Univ. of Tech. Semantic Web Services - Morteza Amini 8
Combining Semantic Web and Web Services
Semantic Web + Web Services = Semantic Web Services
Using Semantic Web technologies to describe Web Services and User Requirements.
Enable automation in: Publication Discovery Selection Composition Execution
Sharif Univ. of Tech. Semantic Web Services - Morteza Amini 9
Current Web Service Technologies
UDDI Registry of services
WSDL Service description
SOAP Message format
Sharif Univ. of Tech. Semantic Web Services - Morteza Amini 10
Service Oriented Architecture
Service Broker Service
User
Service Provider
Find
Publish Bind
UDDI
WSDL
SOAP
SOAP SOAP
Only Syntax, Agents can not
understand meanings
Sharif Univ. of Tech. Semantic Web Services - Morteza Amini 11
Service Oriented Architecture
Web-based SOA as new system design paradigm
Sharif Univ. of Tech. Semantic Web Services - Morteza Amini 12
UDDI
UDDI: Universal, Description, Discovery, and Integration
UDDI provides a mechanism for clients to find web services.
A UDDI registry is similar to a CORBA trader, or it can be thought of as a DNS service for business applications.
UDDI consists of: White pages: Who is the service provider? Yellow pages: What is the service providing? Green pages: How the service can be used?
Public UDDIs Microsoft, IBM, others Multitude of services is registered Most services no longer available Not used in practice
Private UDDIs
Sharif Univ. of Tech. Semantic Web Services - Morteza Amini 13
WSDL (1)
WSDL: Web Services Description Language
An XML-based interface description language that is used for describing the functionality offered by a web service.
Sharif Univ. of Tech. Semantic Web Services - Morteza Amini 14
WSDL (2)
The terms used in WSDL are:
Service: a set of system functions.
Port (Endpoint): defines the address or connection point to a web service and typically represented by a simple HTTP URL string.
PortType (Interface): Defines a web service by the collection of operations and the messages that are used to perform the operation.
Operation: defines the actions Name Input/output
Binding: description of network protocol for invocation. Sharif Univ. of Tech. Semantic Web Services - Morteza Amini 15
WSDL Example (1) <definitions name="HelloService" targetNamespace="http://www.examples.com/wsdl/HelloService.wsdl" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://www.examples.com/wsdl/HelloService.wsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <message name="SayHelloRequest"> <part name="firstName" type="xsd:string"/> </message> <message name="SayHelloResponse"> <part name="greeting" type="xsd:string"/> </message> <portType name="Hello_PortType"> <operation name="sayHello"> <input message="tns:SayHelloRequest"/> <output message="tns:SayHelloResponse"/> </operation> </portType> <binding name="Hello_Binding" type="tns:Hello_PortType"> <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> <operation name="sayHello"> <soap:operation soapAction="sayHello"/> <input> <soap:body encodingStyle=http://schemas.xmlsoap.org/soap/encoding/ namespace="urn:examples:helloservice" use="encoded"/> </input> <output> <soap:body encodingStyle=http://schemas.xmlsoap.org/soap/encoding/ namespace="urn:examples:helloservice" use="encoded"/> </output> </operation> </binding> <service name="Hello_Service"> <documentation>WSDL File for HelloService</documentation> <port binding="tns:Hello_Binding" name="Hello_Port"> <soap:address location="http://www.examples.com/SayHello/" /> </port> </service> </definitions>
Sharif Univ. of Tech. Semantic Web Services - Morteza Amini 16
WSDL Example (2)
Definitions: HelloService
Type: Using built-in data types and they are defined in XMLSchema.
Message: sayHelloRequest : firstName parameter say Helloresponse: greeting return value
Port Type: sayHello operation that consists of a request and a response service.
Binding: Direction to use the SOAP HTTP transport protocol.
Service: Service available at http://www.examples.com/SayHello/
Port: Associates the binding with the URI http://www.examples.com/SayHello/ where the running service can be accessed.
Sharif Univ. of Tech. Semantic Web Services - Morteza Amini 17
SOAP
SOAP: Simple Object Access Protocol
SOAP is basically a technology to allow for “RPC over the web".
SOAP is a message layout specification that defines a uniform way of passing XML-encoded data.
Binding to HTTP as a communication protocol.
SOAP Message Envelope
Header Sender address Receiver address Intermediate nodes Security information Format of the body
Body Message content, typically XML
Sharif Univ. of Tech. Semantic Web Services - Morteza Amini 18
Other Web Service Standards
WS-Addressing Defining endpoints of services
WS-Security Comprehensive security framework for web services
WS-Policy Specification of policies for access, pricing, etc...
etc...
Sharif Univ. of Tech. Semantic Web Services - Morteza Amini 19
Current Use of Web Services
On the Web Amazon
Finding products Adding, deleting, updating shopping cart Payment still over the Web
Google Search Google via Web Service API Accessing other Google services
Weather, stock tickers, etc... Most public services use HTTP/GET, not SOAP
In Enterprises Many companies implementing Web Services Example: Verizon
Before WSs: information about telephone numbers stored in 50 places With WSs: one Web Service to retrieve telephone numbers 1500 Business functions implemented using Web Services Custom registry with services
Sharif Univ. of Tech. Semantic Web Services - Morteza Amini 20
Outline
Semantic Web Services Basics
Challenges in Web Services
Semantics in Web Services
Web Service Modeling Ontology
Sharif Univ. of Tech. Semantic Web Services - Morteza Amini 21
Advertising Services
Current repositories (UDDI) “polluted“: many registered services are not working now!
Advertise functionality of the service.
No non-functional aspects like: Security Accessibility Cost
Sharif Univ. of Tech. Semantic Web Services - Morteza Amini 22
Discovering Services
Finding services which provide required functionality.
Requester needs to specify requirements.
Mechanism for matching required with advertised functionality.
Currently no way of specifying requirements.
Discovery currently manual.
Sharif Univ. of Tech. Semantic Web Services - Morteza Amini 23
Selecting Services
Given a set of services which meet requirements, select service with best availability, lowest cost, best security measures, etc..
Select best service wrt. set of preferences. Specification of requester's preferences. Specification of non-functional properties of service.
Selection currently manual.
Sharif Univ. of Tech. Semantic Web Services - Morteza Amini 24
Service Composition
Required functionality requires multiple services to be invoked in some combination Sequential execution Parallel execution Loops
Specifying requirements Single requirement specification
Find composition which fulfills requirement Workflow description
Discovery of services for each task
Composition currently manual process specification (e.g. BPEL, WSFL).
Sharif Univ. of Tech. Semantic Web Services - Morteza Amini 25
Example of Service Composition (1)
Just simple services, without composition.
Sharif Univ. of Tech. Semantic Web Services - Morteza Amini 26
Example of Service Composition (2)
Service composition to fulfill the requirement.
Sharif Univ. of Tech. Semantic Web Services - Morteza Amini 27
Service Execution
How to invoke a service?
If requester and provider use same format, current technologies suffice.
What if actual formats differ? We need translation of message content, in this situation.
Sharif Univ. of Tech. Semantic Web Services - Morteza Amini 28
Outline
Semantic Web Services Basics
Challenges in Web Services
Semantics in Web Services
Web Service Modeling Ontology
Sharif Univ. of Tech. Semantic Web Services - Morteza Amini 29
Semantics in Web Services (1)
Description of Functionality of services
e.g., searching, selling books, booking flight
User requirements e.g., finding, buying books, booking flight
Web Service policies Permissions Cost etc...
User preferences Data in messages
Sharif Univ. of Tech. Semantic Web Services - Morteza Amini 30
Semantics in Web Services (2)
Matching descriptions functionality of service vs. user requirements policies vs. user preferences
Data translation
Web Service Composition Finding compositions Matching composition with user requirements
Sharif Univ. of Tech. Semantic Web Services - Morteza Amini 31
Functional Description of Services
Describe functionality of Services
Similar to software specification
View web service as a function: input → output
Sharif Univ. of Tech. Semantic Web Services - Morteza Amini 32
Rules for Policy Description
Policies are often in the form of rules. e.g., “if user is recognized business partner, then give discount“. “if used encryption method is at least 3DES, then credit card
detail may be transferred“.
Use Semantic Web rules language for specifying policies.
Initiatives for using rules to specify web service policies (e.g., policy RuleML).
Sharif Univ. of Tech. Semantic Web Services - Morteza Amini 33
Semantic Web Languages for Data Description
Transfer data in RDF or OWL format Advantage: More flexible than XML Advantage: using ontology for describing structure of data
Use ontologies for describing structure of data.
If both parties use same ontology, no translation necessary.
Data transformation based on ontology mapping (rules).
Sharif Univ. of Tech. Semantic Web Services - Morteza Amini 34
Outline
Semantic Web Services Basics
Challenges in Web Services
Semantics in Web Services
Web Service Modeling Ontology
Sharif Univ. of Tech. Semantic Web Services - Morteza Amini 35
Ontologies for Semantic Web Services
Use ontologies to describe Web Services
DAML-S (since 2001)
OWL-S (since 2003)
Based on OWL-DL
WSMO (since 2004)
SWSO (since 2005)
Based on FLOWS
(First-order Logic Ontology for Web Services)
Sharif Univ. of Tech. Semantic Web Services - Morteza Amini 36
Outline
Semantic Web Services Basics
Challenges in Web Services
Semantics in Web Services
Web Service Modeling Ontology
OWL–S WSMO
Sharif Univ. of Tech. Semantic Web Services - Morteza Amini 37
OWL-S
OWL-S is an OWL ontology to describe Web services
OWL-S leverages on OWL to Support capability based discovery of Web services Support automatic composition of Web Services Support automatic invocation of Web services
Complete do not compete OWL-S does not aim to replace the Web services standards rather OWL-S attempts to provide a semantic layer
OWL-S relies on WSDL for Web service invocation (see Grounding) OWL-S expands UDDI for Web service discovery
Sharif Univ. of Tech. Semantic Web Services - Morteza Amini 38
OWL-S
The ontology of services provides three essential types of knowledge about a service: service profile, service model, service grounding.
The class Service provides an organizational point of reference for a declared Web Service. 1. The class Service “presents” a ServiceProfile: “What does the service provide for and require of agents?” 2. The class Service is “describedBy” a ServiceModel: “How does it work?” 3. The class Service “supports” a ServiceGrounding: “How to access the service?”
Sharif Univ. of Tech. Semantic Web Services - Morteza Amini 39
OWL-S ― Service Profile (1)
Service Profile specifies the functionality of the service and the conditions that must be satisfied for a successful result.
Two main uses:
1. Advertisements of Web Services capabilities
2. Request of Web services with a given set of capabilities
Sharif Univ. of Tech. Semantic Web Services - Morteza Amini 41
OWL-S ― Service Profile (1)
Profile Properties: Service Name, Contacts and Description
human-readable information
Functionality Description (Input/Output/Precondition/Result)
The profile represents two aspects of the functionality of the service: the information transformation (represented by inputs and outputs)
the state change produced by the execution of the service (represented by preconditions and effects)
Profile Attributes (Category/Parameter)
other aspects of services of which users should be aware
Sharif Univ. of Tech. Semantic Web Services - Morteza Amini 42
OWL-S ― Service Model
Modeling services as processes.
To give a detailed perspective on how to interact with a service, it can be viewed as a process.
Process is a subclass of ServiceModel.
A process is not a program to be executed. It is a specification of the ways a client may interact with a service.
Sharif Univ. of Tech. Semantic Web Services - Morteza Amini 45
OWL-S ― Process Ontology
Process Ontology can have any number of inputs and outputs representing the information required for execution.
The OWL-S defines three types of processes: Atomic (single-step, directly invokable), Simple (single-step, but not directly invokable), Composite (decomposable into other processes).
Sharif Univ. of Tech. Semantic Web Services - Morteza Amini 47
Atomic Process
The atomic processes can be invoked directly and are executed in a single step.
For each atomic process, there is a grounding that enables a service requester to construct messages.
An AtomicProcess is a subclass of a Process
Sharif Univ. of Tech. Semantic Web Services - Morteza Amini 48
Simple Process
Simple processes are not associated with a grounding. They are single-step executions.
Simple processes are used as elements of abstraction;
a simple process may be used either to provide a view of some atomic process, or a simplified representation of some composite process.
Sharif Univ. of Tech. Semantic Web Services - Morteza Amini 49
Composite Process (1)
Composite processes are decomposable into other processes. The decomposition shows how the various inputs and outputs are accepted.
A CompositeProcess must have a composedOf property, which indicates the control structure of the composite, using a ControlConstruct.
Sharif Univ. of Tech. Semantic Web Services - Morteza Amini 50
OWL-S ― Grounding
Specifies the details of how to access the service Protocol and message format Serialization, transport and addressing
A mapping from an abstract to a concrete specification of those service description elements that are required for interacting with the service; i.e., the inputs and outputs of atomic processes.
both the ServiceProfile and the ServiceModel are thought of as abstract representations; only the ServiceGrounding deals with the concrete level of specification.
Sharif Univ. of Tech. Semantic Web Services - Morteza Amini 52
Rational of Service Grounding
Provides a specification of service access information.
Service Model + Grounding give everything needed for using the service Service description is for reasoning about the service
Decide what information to send and what to expect
Service Grounding is for message passing Generate outgoing messages, and get incoming messages Mapping XML Schemata to OWL concepts
Builds upon WSDL to define message structure and physical binding layer
Sharif Univ. of Tech. Semantic Web Services - Morteza Amini 53
Outline
Semantic Web Services Basics
Challenges in Web Services
Semantics in Web Services
Web Service Modeling Ontology
OWL–S WSMO
Sharif Univ. of Tech. Semantic Web Services - Morteza Amini 54
WSMO
WSMO: Web Service Modeling Ontology
An ontology for Semantic Web Services.
Provides conceptual model for SWS.
Provide terminology for data exchanged between service requesters and providers.
Principles of WSMO: Ontology-based descriptions Strict decoupling of components Mediation between components Interface, not implementation
Sharif Univ. of Tech. Semantic Web Services - Morteza Amini 55
WSMO Top Level Notions
Objectives that a client wants to achieve by using Web Services
Provide the formally specified terminology of the information used by all other components
Semantic description of Web Services: - Capability (functional) - Interfaces (usage)
Connectors between components with mediation facilities for handling heterogeneities
Sharif Univ. of Tech. Semantic Web Services - Morteza Amini 56
Web Service Descriptions (1)
Functionality offered by the Web Service.
Functional description, in the form of a capability: Assumptions
Conditions on the state of the world that has to hold before the Web Service can be executed
Preconditions What a web service expects in order to be able to provide its service.
They define conditions over the input.
Effects Conditions on the state of the world that hold after execution of the
Web Service (i.e. changes in the state of the world)
Postconditions describes the result of the Web Service in relation to the input, and
conditions on it
Sharif Univ. of Tech. Semantic Web Services - Morteza Amini 57
Web Service Descriptions (2)
Behavioral description, in the form of an interface: Choreography
How to interact with the service to consume its functionality.
Orchestration How service functionality is achieved by aggregating other Web
Services.
Sharif Univ. of Tech.
Web Service
Implementation (not of interest in Web Service Description)
Choreography --- Service Interfaces ---
WS
WS
client-service interaction interface for consuming WS - External Visible Behavior - Communication Structure - ‘Grounding’
realization of functionality by aggregating other Web Services - functional decomposition - WS composition
WS
Orchestration
Semantic Web Services - Morteza Amini 58
Goals
Goal-driven Approach: Usage of Goals within Semantic Web Services
A Requester (human or machine) defines a Goal to be resolved independently and on the knowledge level
SWS techniques / systems automatically determine Web Services to be used for resolving the Goal (discovery, composition, execution, etc.)
Goal Resolution Management is realized in implementations
Client Objective Specification along with all information needed for automated resolution
Sharif Univ. of Tech. Semantic Web Services - Morteza Amini 60
Goals Description
Functionality requested from the Web Service
Description symmetric to Web Service description: Capability Interface
Sharif Univ. of Tech. Semantic Web Services - Morteza Amini 61
Mediation
Heterogeneity …
Mismatches on structural / semantic / conceptual / level
Occur between different components that shall interoperate
Especially in distributed & open environments like the Internet
Concept of Mediation (Wiederhold, 94):
Mediators as components that resolve mismatches
Declarative Approach: Semantic description of resources ‘Intelligent’ mechanisms that resolve mismatches independent of content
Mediation cannot be fully automated (integration decision)
Levels of Mediation within Semantic Web Services (WSMF): (1) Data Level: mediate heterogeneous Data Sources (2) Protocol Level: mediate heterogeneous Communication Patterns (3) Process Level: mediate heterogeneous Business Processes
Sharif Univ. of Tech. Semantic Web Services - Morteza Amini 62
Goal-driven Architecture
Client Goal
- objective (desired final state) - input for service usage - goal resolution constraints, preferences, and policies
Goal Resolution Plan - goal resolution algorithm - decomposition (optional) - service usage / invocation
corresponds to / creation of
defines
Service Implementation
(not of interest here)
functional behavioral
service detection & composition
Client-Side Service-Side
Domain Knowledge Ontology Ontology Ontology Ontology
service usage
Sharif Univ. of Tech. Semantic Web Services - Morteza Amini 64
OWL-S and WSMO: Commonalities and Differences
OWL-S = ontology and language to describe Web services
WSMO = ontology and language for core elements of Semantic Web Service systems
Main Description Elements Correlation
OWL-S Elements WSMO Elements
OWL-S profile WSMO capability + non-functional properties
OWL-S Process Model WSMO Service Interfaces
OWL-S Grounding WSMO Grounding
Sharif Univ. of Tech. Semantic Web Services - Morteza Amini 65
Mediation in OWL-S and WSMO
OWL-S does not have an explicit notion of mediator Mediation is a by-product of the orchestration process
E.g. protocol mismatches are resolved by constructing a plan that coordinates the activity of the Web services
…or it results from translation axioms that are available to the Web services It is not the mission of OWL-S to generate these axioms
WSMO regards mediators as key conceptual elements Different kinds of mediators:
OO Mediators for ensuring semantic interoperability GG, WG mediators to link Goals and Web Services WW Mediators to establish service interoperability
Reusable mediators
Sharif Univ. of Tech. Semantic Web Services - Morteza Amini 66
Semantic Representation
OWL-S and WSMO adopt a similar view on the need of ontologies and explicit semantics but they rely on different logics
OWL-S is based on OWL/SWRL OWL represent taxonomical knowledge SWRL provides inference rules
WSMO is based on WSML a family of languages with a common basis for
compatibility and extensions in the direction of Description Logics and Logic Programming
Ontologies Abstract State Machines and formal model for Service Interface Descriptions
Sharif Univ. of Tech. Semantic Web Services - Morteza Amini 67
OWL vs WSML
OWL Lite
OWL DL
OWL Full
WSML Flight
WSML DL
WSML Core
WSML Rule
WSML Full
Description Logics
full RDF(S) support
subset
Description Logics
Logic Programming
First Order Logic
Sharif Univ. of Tech. Semantic Web Services - Morteza Amini 68
Summary
OWL-S WSMO current Web Service
technologies
Discovery What it does
Profile Goals and Web
Services (capability)
UDDI API
Consumption & Interaction
How to consume & realize Process Model
Service Interfaces (Choreography +
Orchestration) BPEL4WS
Invocation How to invoke
Grounding+ WSDL/SOAP
Grounding (WSDL / SOAP, ontology-based)
WSDL/SOAP
Sharif Univ. of Tech. Semantic Web Services - Morteza Amini 69
References
W3C, OWL-S: Semantic Markup for Web Services, http://www.w3.org/Submission/OWL-S/
Semantic Web Service Tutorial, HICSS 39, Kauai (Hawaii), 04 January 2006
Sharif Univ. of Tech. Semantic Web Services - Morteza Amini 70