218c347406fe6583a3389c88e2d8c396.ppt
- Количество слайдов: 20
XML Grammar and Parser for WSOL Kruti Patel, Vladimir Tosic, Bernard Pagurek Network Management & Artificial Intelligence Lab Department of Systems & Computer Engineering Carleton University, Ottawa, Canada kpatel@sce. carleton. ca
Outline Research goals n WSOL n XML Grammar for WSOL n Parser for WSOL n WSOL Examples n Conclusions n Future Work n
Research Goals Development of XML grammar for WSOL n Development of a parser for WSOL according to the developed WSOL grammar n Development of illustrative examples n Verification of implementability of the architecture of the WSOL language and WSOL language constructs n
WSOL (Web Service Offerings Language) XML-based Language n Fully compatible with the Web Services Description Language (WSDL) 1. 1 n Enables formal specification of one or more service offerings for one WSDL description of a Web Service n
Web Service WSDL language enables description of • Functionality of the Web Service Defined for this particular WSDL • Location of the description of Web Service the Web Service • Methods for accessing the Web Service WSDL Document WSOL language enables description of • Multiple Service Offerings for the Web Service Ø Service Offering 1 Ø Service Offering 2 Ø Service Offering 3 WSOL Document
Service Offering Represents a single class of service for a Web Service n Contains a combination of various constraints and statements n Constraints supported by WSOL n – Functional constraints: preconditions, postconditions, future-conditions, periodic futureconditions – Nonfunctional (a. k. a. , Qo. S) constraints – Access Rights
Service Offering (cont’d) n Statements supported by WSOL – – – – – n Subscription payment model Price/Penalty default Price/Penalty External Operation Calls Management Responsibility Constraint Group (CG) Constraint Group Template (CGT) Instantiation of CGT Include Service Offering Multiple service offerings relate to the same functionality of a Web Service, but differ in constraints & statements
Multiple Service Offerings Web Service Relate to the same functionality of the Web Service described in a WSDL document • Constraints • Statements Differ in Precondition - A > 0 specification of Qo. SConstraint constraints and Response Time < 10 ms statements Price - 1 Dollar Subscription - 50 $, 1 Yr Constraint Group – CG 1 Service Offering 1 Postcondition - B > C Qo. SConstraint Response Time < 100 ms Price – 0. 25 Dollar Subscription - 25 $, 1 Yr Constraint Group – CG 2 Service Offering 2
XML Grammar for WSOL Specifies in XML, the structure and content of various constraints and statements supported by WSOL n Specified using the XML Schema language in a schema called the “WSOLSchema” n Enables generation of WSOL documents that conform to the grammar n
WSOL grammar – Example 1 n Graphical represent ation of “Service Offering” statement specified in the WSOL grammar
WSOL grammar – Example 2 n Graphical representation of “subscription” statement specified in the WSOL grammar
Parser for WSOL A very basic and important tool for the WSOL language n Validates the WSOL documents developed according to the WSOL grammar n Detects and reports various syntax and semantic errors in the WSOL documents n Discovers and notifies the location (i. e. , file name, & line number) of each error detected in the WSOL documents n
Parser for WSOL (cont’d) n n n We have developed a prototype parser for WSOL in Java We re-use the Apache Xerces 2 Java XML parser to develop the WSOL parser The WSOL parser – Scans WSOL & WSOL-related documents – Stores important information (such as element names, attribute values, attribute types, etc. ) in multiple symbol tables while scanning – Uses information from the symbol tables to detect and report more complex syntax and semantic errors – Generates a DOM tree or SAX events for each document being parsed, depending on the underlying XML parser used (i. e. , DOM or SAX)
WSOL Document WSDL Document conforms to WSOL Parser Underlying XML parser - DOM Parser output Detects and reports syntax & semantic errors WSDL Grammar WSOL Grammar Detects and reports syntax & semantic errors input conforms to Underlying XML parser – SAX Parser output SAX events for WSDL & WSOL documents DOM trees for WSDL & WSOL documents To be used for code generation
Symbol Table n n A very important component of the WSOL parser Enables the WSOL parser to verify type compatibility Enables the WSOL parser to prepare automatic generation of constraint-checking code Creation of multiple nested symbol tables (scoped according to the structure of the document being parsed) enables the WSOL parser to detect semantic errors
buy. Stock. Service Example n n n Developed to demonstrate how the WSOL parser works Also developed to validate and verify the WSOL grammar and the WSOL parser buy. Stock. Service – A Web Service that enables its consumers to buy stocks of one or more companies – Its functionality, location, and access methods are described using WSDL – Multiple service offerings for its WSDL description are specified using WSOL
buy. Stock. Service (Web Service) WSDL description buy. Stock. Port. Type buy. Single. Stock. Operation buy. Single. Stock. Request symbol quantity buy. Single. Stock. Response total. Stock. Buying. Cost buy. Stock. Binding buy. Stock. Port buy. Stock. Service. wsdl WSOL description Service. Offering 1 Constraint 1 – pre. Condition quantity > 0 Constraint 2 – Qo. SConstrain Response. Time < 5 ms Price – 0. 5 $ Management. Responsibility Supplier. Responsibility scope - Service. Offering 1 Service. Offering 2 … service. Offerings. wsol
buy. Stock. Service Example n Example of a precondition (i. e. , functional constraint) specified for the buy. Stock. Service
Conclusions n n WSOL language - enables formal specification of constraints and classes of service for Web Services WSOL Grammar - has been developed to specify the structure and content of the WSOL language concepts in XML Prototype WSOL Parser - has been developed to validate WSOL documents, and to detect and report syntax and semantic errors including the locations of the errors Examples - have been developed to verify the WSOL grammar and the prototype WSOL parser
Future Work n n The WSOL language (currently compatible with WSDL 1. 1) will be updated to be compatible with WSDL 1. 2 (still under development) The WSOL grammar, parser, & examples will be modified for the updated WSOL language A WSOL compiler (including a code generator for automatic generation of constraint-checking code in Java) will also be developed for the WSOL language A Java API for easier generation of WSOL documents that conform to the WSOL grammar will also be developed in future


