• No results found

Review of existing WSDL parsers

3.2 Design

3.2.3 Review of existing WSDL parsers

Below the information about WSDL parsers is presented.

Introduction

WSDL parser is the library that reads WSDL documents and creates application objects based on extracted information. Moreover, WSDL parser can additionally allow performing opposite operation – export information from application object to editable WSDL document. In this section, freeware WSDL parsers available on the market are described and compared.

All WSDL parsers considered in this section require Oracle Java Development Environment 1.6 (or later) and Oracle JDK 1.6 (or later). Among limited number of WSDL parsing libraries, three have been chosen: EasyWSDL Toolbox, Woden and WSDL4J.

EasyWSDL Toolbox

35 Publisher web site: http://easywsdl.ow2.org/

EasyWSDL Toolbox [43] is a WSDL parsing library. It can be used to parse both WSDL 1.1 and WSDL 2.0 descriptions and transforms them in a unified object model (based on the WSDL 2.0 entities). Library is written in Java language and therefore can be used within java compatible application only.

EasyWSDL can read, write, edit and createWSDL 1.1,WSDL 2.0andXML Schema(following W3C recommendations/submissions) objects. There is a uniform API for both WSDL versions (1.1 and 2.0). Library is WSDL 2.0 oriented, which includes mechanism for solving the compatibility issues between both versions of WSDL. The naming convection of the WSDL 2.0 types and elements is used when elements implementing the same concept have two different names (ex: PortType in WSDL 1.1 and Interface in WSDL 2.0) in WSDLs versions (Interface in this case is chosen).

Library provides the capability with the most used bindings, which are described in details in section 2.1.3, of the two WSDL versions. It does not require casting explicitly objects within Java and the easy WSDL API provides all necessary methods to retrieve bindings (ex: getSOAP11Binding4WSDL11). It is based on a plug-in architecture, which allows the developer to add new functionalities.

Woden

Publisher: The Apache Software Foundation Publisher web site: http://ws.apache.org/woden/

The Woden [44] project is a subproject of the Apache Web Services Project to develop a Java class library for reading, manipulating, creating and writing WSDL documents, initially to support WSDL 2.0 but with the longer-term aim of supporting past, present and future versions of WSDL. Woden allows users to read, write, edit and create WSDL 2.0(following W3C recommendations) objects. There is a uniform API for WSDL 2.0 version. WSDL 1.1 documents can be converted to WSDL 2.0 using the W3C standardized XSL Stylesheet [45]. A factory mechanism used to obtain a WSDL reader (or parser) object.

Optionally WSDL reader may be configured - for example, switching the validation feature, which checks formal validity of WSDL document. Parser reads (deserialize) a WSDL document located at a specified URL into the Woden WSDL 2.0 object model.

Two forms of the WSDL 2.0 object model are present: one representing the WSDL 2.0 abstract component model and the one that maps to the XML elements and attributes in the WSDL namespace. Woden can parse almost all elements and attributes in the WSDL 2.0 namespace (the 'extends' attribute of Interface is the only one not supported element). Partial WSDL validation is supported using the assertions defined in the WSDL 2.0 spec. Validation exists for Types, Interface and Binding only. Transforming the WSDL document is performed via methods of the WSDL 2.0 object model.

Library supports extensibility of elements and attributes (i.e. the XML elements and attributes that extend standard elements in the WSDL 2.0 namespace). Woden can use this

36 extensibility mechanism for the SOAP binding extensions defined in the WSDL 2.0 spec. Woden provides a customizable error handling mechanism for reporting warnings, errors or fatal errors that result from WSDL validation or Woden configuration problems.

WSDL4J

Publisher: The Apache Software Foundation Publisher web site: http://wsdl4j.sourceforge.net/

The Web Services Description Language for Java Toolkit (WSDL4J) [46] allows the creation, representation, and manipulation of WSDL documents. It allows reading, writing, editing and creatingWSDL 1.1(following W3C recommendations/submissions) object. There is an API for WSDL 1.1 version. WSDL4J uses the reader to parse (deserialize) a WSDL document at a specified URL into the WSDL4J WSDL 1.1 object model.

Two forms of the WSDL 1.1 object model are available: the one representing the WSDL 2.0 abstract Component model and the one that maps WSDL structure and element to the XML elements and attributes in the WSDL namespace. Parsing supports all the elements and attributes in the WSDL 1.1 namespace. Partial WSDL validation is possible using the assertions defined in the WSDL 1.1 specification. Manipulating the WSDL document is realized via methods of the WSDL 1.1 object model.

EasyWSDL Toolbox Woden WSDL4J

WSDL 1.1 support Full Partial (conversion to 2.0)

Full

WSDL 2.0 support Full Full None

Parsing to objects (object model)

Yes Yes Yes

Object Casting Needed No Yes Yes Uniform WSDL 1.1 and 2.0 API Yes No No Conversion from WSDL 1.1 to 2.0 No Yes No

Plug-in support Yes No No

WSDL validation No Yes Partial

Error handling Yes Yes No

Table 1 – Comparison of WSDL parsers functionality

Summary

In table 1, all three parsers have been compared regarding most important functions. For purpose of WSDLTest EasyWSDL Toolbox has been chosen. It provides full support for WSDL 2.0 standard on which library is based. Moreover, it has easy to use and functional

37 API and provides error handling of its functions, meaning that it fulfills all requirements from program specification. Woden parser provides similar functionality, however its API usage is more complex. It also fulfills WSDLTest specification. WSDL4J of all three parsers is least mature project providing less number of functions. Moreover, it does not fulfill WSDLTest specification.

Related documents