Enhancing Web Service Descriptions using WSDL-S Presented by Preeda Rajasekaran LSDIS Lab, University of Georgia (Under the Direction of John A. Miller) 2 Outline Introduction Adding Semantics to Web Services WSDL-S Source Code Annotation METEOR-S METEOR-S, SWSDT (Semantic Web Services Development Tool) Related Work Conclusion Future Work 2 3 Introduction 3 4 Introduction Web Service based IT infrastructures becoming popular Industry wide standardization (WSDL, SOAP etc. ) XML based technologies which run over Web servers Gartner claims by 2008 60% of IT infrastructure will be Web service based [http://www.itfacts.biz/index.php?id=P408] Current state of Web service usage Manual application integration (typically internal) The promise Automatic (semi-automatic) application integration on the fly 4 5 Goals (Semi) Automatic Integration Current standards like WSDL, UDDI are syntactical Semantic heterogeneity in data [Sheth & Larson, 1990] and functions Need to provide semantic underpinnings to handle semantic heterogeneity (ambiguity) This work Deals with adding semantics to Web Service Description Language (WSDL) by proposing WSDL-S 5 6 What are Web Services ? * WSDL – Web Service Description Language 2. WSDL 4. Requested Service WSDL 3. Service Discovery Query Service Requestor * UDDI – Universal Description, Discovery and Integration UDDI Service Registry * SOAP – Simple Object Access Protocol 1. WSDL Interface 5. Service Request Service Provider 6. Service Response WSDL Web Services Interaction Model “self-contained,selfdescribing,modular applications that can be published, located, and invoked across the Web” [IBM Web Service Tutorial] 6 7 What are Semantics? Semantics deals with meaning/content. Helps to express relationship between word symbols and their intended meaning A Service represented in many ways may still have the same context –semantics captures this. Enables to ‘understand’ the content. 7 8 How to represent Semantics? Representation of semantics via ontologies. Ontology ‘ a set of distinct objects resulting from an analysis of a domain, or microworld’. Provides a representation of the real world Ontologies serve as an agreed vocabulary of terms and their intended meaning. 8 9 OWL- Web Ontology Language Standard accepted by W3C Based on Description Logic Used to represent the real world OWL Description Logics RDF/RDFS XML/XSD 9 10 Introduction Adding Semantics to Web Services 10 11 Semantic Web Services Web Services enhanced with the power of semantics - Semantics 11 12 Semantics in Semantic Web Service Architecture Enhanced UDDI Service Provider Data structure of UDDI is organized so as to hold semantic information Annotated WSDL files – which contain semantic information about the service Service Requestor Service Templates – Semantically enriched discovery queries 12 13 Web Services Descriptions WSDL provides the interface for the operations offered by a service. Service Description Contains Operation Name, Input , Output, Exceptions, Transport and Message protocol, Access Port. 13 14 Semantic Modeling Of An Operation (in WSDL-S) Classification of operation output = pre ( input ) ? f ( input , state i ): g ( input, state i ) [C-like conditional IF expression] State i +1 = h ( input, state i ) assert post ( output, state i+1 ) = 1 f() – output function g() – exception function h()- transition function 14 15 Introduction Adding Semantics to Web Services WSDL-S 15 16 WSDL-S WSDL-S (WSDL with Semantic Annotation) Mapping Input and Output Message Parts to Ontology Mapping Operations to Ontology XML Schema elements used in Input/Output messages do not reflect the semantics of the data involved in Web Service operation Use of ontologies or standard vocabulary* provides well defined semantics for operational data Service selection involves discovering appropriate WSDL description and locating an operation to invoke Operations with same signature could have different functionalities Ontology or vocabulary* depicting functionality is used for annotation Additional tags to represent pre-conditions and effects/postconditions of each operation Pre-conditions and Post-Conditions are added for each operation Can be optionally used for service discovery and selection * RosettaNet Business/Technical dictionary or ebXML Core Component catalog/dictionary * Current implementation uses vocabularies The focus of our work is not in developing ontologies for representing functionality/preconditions/effects but to use such ontologies for semantic annotation 16 17 WSDL 1.1 Meta Model 17 18 WSDL-S 1.1 MetaModel 18 19 WSDL-S 1.1 tags “wsdls:concept” Attribute of operation and part tag. “ wsdl:precondition” Attribute of operation tag. Multiple seperated by ‘&&’. “wsdl:postcondition” Attribute of the operation tag. Multiple seperated by ‘&&’. “wsdls:location” Attribute of service tag. “wsdls:domain” Attribute of service tag. 19 20 WSDL-S 1.1 Code Snippet 20 21 WSDL 2.0 Current Working Draft Type information moved outside the standard Commonly used types : XSD, XMI This features helps to Add OWL as a semantic type (semantic annotations) WSDL 2.0 Components 21 22 WSDL-S 2.0 Meta Model 22 23 Introduction Adding Semantics to Web Services WSDL-S Source Code Annotation 23 24 Source Code based Development of SWS Capture the semantics of the service and the operations Java 5.0 Meta-Tag Feature Incorporate semantics during service interface design JSR 175 & JSR 181 Helps to create service implementation Similar to javadoc Comments 24 25 Base JSR 181 Tags MetaTag Name Description WebService Marks a particular Java Implementation to be a Web Service. WebMethod Marks individual methods to be exposed as Web Service Operations. WebParam Used to represent the WSDL message part element for an operation input. WebResult Used to represent the WSDL message part element for an operation output. SOAPBinding Specifies the mapping of the Web Service onto the SOAP message protocol. 25 26 Semantic Meta-tags Extends JSR 181 Tags used to represent Web Services Each Tag corresponds to a WSDL element Semantic Information collected using Java 5 Reflection API. 26 27 Semantic Meta-tags MetaTag Name WSDL Tag SemanticWebService (Service Level) Service SemanticWebMethod (Method Level) Operation SemanticWebParam (Method Level) SemanticWebResult (Method Level) Part Part Description Specifies semantics associated with the service like service- location and service- domain. Associates semantic concept with Web Method. Encapsulates Web Method tag. Value of the ‘action’ attribute provides the functional semantics of the operation. Associates semantic concept with input parameter of an operation. Encapsulates WebParam tag. Value of the ‘element’ attribute is used to refer to the semantic type that closely defines the input parameter. The user needs to ensure that the semantic and data-type match before annotating. Associates semantic concept with output of an operation. Encapsulates WebResult tag. 27 28 Semantic Meta-tags MetaTag Name exception (Method Level) WSDL Tag fault exceptions (Method Level) pre (Method Level) Description Associates semantic concept with exceptions thrown by methods. This tag represents multiple exceptions thrown by an operation. Collection (Array) of exception tags. operation Represents the pre conditions. 28 29 Semantic Meta-tags MetaTag Name WSDL Tag post (Method Level) operation Constraints (Method Level) operation Collection of pre and post tags. PortType (Service Level) portType Associates a name with the port Type. Namespace (Service Level) Definitions Description Represents the post conditions. Defines namespaces for the annotations incorporated. 29 30 Semantic Meta-tags MetaTag Name WSDL Tag Namespaces (Service Level) Binding (Service Level) Description Collection (Array) of namespaces. Binding Service (Service Level) Service Port (Service Level) port Used to specify the name associated with ‘SOAPBinding’. Extends SOAPBinding metatag. Collection (Array) of related ports. Defines individual endpoint by specifying a single address. 30 31 Snippet - Operation Level Annotations - Semantic Tags - JSR 181 Tags 31 32 Snippet – Service Level Annotations - Semantic Tags - JSR 181 Tags 32 33 Introduction Adding Semantics to Web Services WSDL-S Source Code Annotation METEOR-S 33 34 METEOR-S Workflow management for Semantic Web Services is called METEOR-S (METEOR for Semantic Web Services) Uses semantics in the entire life cycle of Semantic Web Services and Processes Semantics in Annotation, Publication, Discovery, Constraint Driven Composition and Execution of Web Services METEOR- Managing End-To-End OpeRations 34 35 METEOR-S Comprehensive use of semantics (Data,Functional,QoS and Execution) Functional Semantics To represent Service/Operation functionality Pre/Post conditions Data Semantics To represent inputs, output, faults (exceptions). Integrates and co-exists with current industry tools, E.g. Eclipse BPWS4J Editor, BPEL4WS Execution Engine. Consistent with and builds upon current standards and recommendations. 35 36 METEOR-S Architecture 36 37 Introduction Adding Semantics to Web Services WSDL-S Source Code Annotation METEOR-S, SWSDT (Semantic Web Services Development Tool) 37 38 Semantic Web Services Development Main stages of Semantic Web Service (SWS) Development 1)Design 3)Implementation 5)Publication 7)Invocation 9)Execution 2)Annotation 4)Deployment 6)Discovery 8)Composition 38 39 METEOR-S SWSDT [Semantic Web Services Development Tool] Developed as an Eclipse Plug-in Used to incorporate semantic annotations into Web Services. Helps to develop Annotated Java source Code Annotated WSDL files (WSDL-S 1.1 & WSDL-S 2.0) 39 40 METEOR-S SWSDT 1 3 2 4 5 40 41 METEOR-S SWSDT The different file generations possible using the tool Java based development of SWS WSDL based development of SWS 41 42 METEOR-S SWSDT Features Easy view of WSDL and Java File Tree representation For Browsing and Editing annotations Simultaneous view of Ontology when browsing WSDL/Java files GUI based incorporation of annotation Incorporates external modules MWSAF – For Automatic Annotation Publisher – For publishing SWS into Enhanced UDDI Discovery – Semantic Discovery of Services using heuristic based subsumption Deployment and Invocation – GUI tools for deploying and 42 invoking SWS 43 METEOR-S SWSDT Architecture METEOR-S Semantic Web Service Tool 1 2 GUI for Manual Java/ WSDL file Annotation 3 MWSAF –For Automatic Annotation 4 6 Annotated Java Source/ WSDL File Generators Semantic Publishing and Semantic Discovery Engine Semantically Enhanced UDDI Registry Deployment and Invocation GUI 5 43 44 Introduction Adding Semantics to Web Services WSDL-S Source Code Annotation METEOR-S, SWSDT (Semantic Web Services Development Tool) Related Work 44 45 Related Work OWL-S DERI Project - WSMO Research Project of DERI (Digital Enterprise Research Institute) 45 46 OWL-S 46 47 OWL-S METEOR-S Comparison OWL-S METEOR-S Service Descriptions Service Profile + WSDL WSDL-S To use/invoke Service Model + Service Grounding +WSDL WSDL-S Process Model BPEL (Business Process Execution Language) Interaction between Services Elements Annotated I –Inputs O -Outputs P –Pre-Conditions E -Effects Repository of services Collection of profile instances/ UDDI Functionality of the operation, Input, Output, Pre-Conditions, PostConditions and Faults Semantically Enhanced UDDI 47 48 Semantic Web Services (WSMO) WSMO (Web Services Modeling Ontology) Two parts WSML – Semantic Web Service Language based on F-logic WSMX – Semantic Web Service Architecture Based on WSMF proposed by Bussler and Fensel WSMO Supports Functional Aspects = (IOPEs) + used mediators Non Functional Aspects = performance, reliability, security etc. Mediators (components cannot communicate without them) Petri nets for execution semantics 48 49 METEOR-S, OWL-S & WSMO METEOR-S OWL-S DERI Service Descriptions WSDL-S WSDL+ Service Profile WSMO Dynamic Execution METEOR-S Dynamic Processor Semantic Web Language Used OWL OWL-S Virtual Machine OWL WSMX [Web Services Execution Environment] WSML [Web Services Modeling Language] (F-logic) 49 50 Introduction Adding Semantics to Web Services WSDL-S Source Code Annotation METEOR-S, SWSDT (Semantic Web Services Development Tool) Related Work Conclusion 50 51 Conclusion Overview Shift towards Modularization of software components Automatic integration Web Services Requirement of richer service descriptions Semantics + Web Services = Semantic Web Services Representation of semantics in Web Services Incorporation of semantics into Web Services 51 52 Conclusion Representing semantics in Web Services WSDL-S Source Code Annotations Extend WSDL to accommodate semantics Tags to incorporate semantics were decided and introduced JSR 181 processor to process the annotations Incorporating Semantics into Web Services METEOR-S SWSDT Eclipse Plug-in Developed and released as an open source project. Available for download,along with installation and user guide at http://lsdis.cs.uga.edu/projects/METEOR-S/Downloads 52 53 Conclusion AUTOMATION SEMANTIC WEB SERVICES WEB SERVICES WE ARE HERE 53 54 Introduction Adding Semantics to Web Services WSDL-S Source Code Annotation METEOR-S, SWSDT (Semantic Web Services Development Tool) Related Work Conclusion Future Work 54 55 Future Work Annotation of Complex Types Move Annotation to Basic types Meta-tags to represent Execution Semantics -QoS Representation of Pre and Post Conditions WSDL-S 1.1 WSDL-S 2.0 Complete Generation based on revised WSDL 2.0 Specification Performance testing of Semantic Web Services APT for processing annotations Use of Digestors To parse WSDL files JUnit like test environment for Semantic Web Services 55 56 Questions 56 Thank You. 58 References METEOR MWSAF - METEOR-S Semantic Web Service Annotation Framework (MWSAF) METEOR-S Web Service Composition Framework (MWSCF) METEOR-S Web Service Discovery Infrastructure (MWSDI) METEOR-S Dynamic Orchestration Environment (MDOE) 58 DEMO of METEOR-S SWSDT… 60 BACK-UP SLIDES 60 62 Service Publication Performed by Service Provider Discover existing interfaces (services) to extend Create service implementations and WSDL based definitions Test , Deploy and Publish the services, in Service Registries (e.g.) Enhanced UDDI Semantics Used to capture the behavior of the published service Enables effective discovery by service requestors 62 63 Service Discovery Based on Service requestor needs To find the service providing Required operations (methods) Required signature for static/dynamic binding Satisfying the requestors constraints such as QoS, Service locality, etc. Semantics To return relevant services ranked based on semantic match criteria 63 64 Service Invocation Service Invocation Performed by Service Requestor after discovering required services Invoke a service using WSDL Specifications SOAP Protocol Semantics Apply transformations when necessary to enable service invocation 64 67 A Plan for Building a SOA – Web Services Requirement #1: Interaction protocols must be standardized. WSDL,SOAP, UDDI –standardized Need to ensure the widest interoperability among unrelated institutions. Requirement #2: Make all contracts explicit. WSDL makes interface definition explicit Explicit contracts define what may be changed in an application without breaking the interaction. It is hard or impossible to make all assumptions explicit, but the more the better. Requirement #2 : Standardize contract language(s) and formats. Use of XML messages Standard metadata is the basis of interoperable contract selection and execution. Requirement #3: Allow for points of variability in the contract. Use of extensibility elements in WSDL Dynamic adaptation on variability points. Increases the number of possible interactions supported. 67 Requirement #4: Provide native composition models and runtimes. [Kunal,2004] 68 Description Logic Description Logic is one of the ‘most important knowledge representation formalism unifying and giving a logical basis to the well known traditions of Frame-based systems, Semantic Networks and KL-ONElike languages, Object-Oriented representations, Semantic data models, and Type systems’ 68 69 DL and OWL DL Construct OWL-DL construct Atomic concept (A) Class (A’) Universal concept (the entire world) (T) OWL: Thing Bottom concept (nothing) () OWL: Nothing Atomic negation () complementOf (C) Conjunction ( ) unionOf (C1 . . .Cn) Disjunction ( ) intersectionOf (C1 . . .Cn) 69 70 DL and OWL DL Construct Value restriction ( e.g. , , , ) Limited existential quantification ( e.g. , ) OWL Consturcts Ledger: A’ – Class C - Description o – individual name R - object or abstract property T – Datatype property B - DataType OWL-DL construct restriction (R {allValuesFrom(C)} {someValuesFrom(C)} {value(o)} [minCardinality(n)] [maxCardinality(m)] [cardinality(l)]) oneOf(o1 . . . on) , restriction (T {allValuesFrom(D)} {someValuesFrom(D)} {value(v)} [minCardinality(n)] [maxCardinality(m)] [cardinality(l)]) D – Data range v – data value l,m,n – non-negative integers {elements}- can be repeated zero or more times [elements] -optional 70 74 WSMO - Goals A goal specifies the objectives that a client may have when he consults a web service E.g. of goals Buy a book Buy a book from Amazon Buy a book written by X Mediators can combine or refine goals E.g. Buy a book from Amazon written by X 74 [Verma,2004] 75 Semantic Web Services (WSMO) Two types of mediators Refiners define a new component as a refinement of an existing component ggMediators: mediators that link two goals. This link represents the refinement of the source goal into the target goal. ooMediators: mediators that import ontologies and resolve possible representation mismatches between ontologies 75 [Verma,2004] 76 Semantic Web Services (WSMO) Two types of mediators Bridges support reuse by enabling two components to interact with each other wgMediators: mediators that link web service to goals. They explicitly may state the difference (reduction) between the two components and map different vocabularies (through the use of ooMediators). wwMediators: mediators linking two Web Services. 76 [Verma,2004] 77 WSMO –Web Service Modeling Ontology Represents Semantic Web Services by F-logic F-logic is used to Describe ontologies Describe rules and goals Uses Mediators to bring about inter-operability 77 [Verma,2004]