XML.com: XML From the Inside Out
oreilly.comSafari Bookshelf.Conferences.


What's New in WSDL 2.0

May 20, 2004

The W3C's Web Services Description Working Group, part of the Web Services Activity, has defined a language for describing web services and the possible ways to interact with them. The WG published its WSDL 2.0 working drafts on 26 March 2004. This is a significant milestone in the progress of WSDL. In this article, I discuss the changes that were made to the WSDL 1.1 specification and other major improvements to the service description language.

W3C WSDL 2.0 Working Drafts

W3C has published the following core working drafts as part of its working group deliverables:

Other related working drafts include requirements and usage scenarios.

The W3C XML Schema definition for WSDL 2.0 specification can be found at http://www.w3.org/2003/11/wsdl/.

The editor's copies of these documents provide updated information about the progress of these specifications.

Changes from the WSDL 1.1 Specification

WSDL 1.2 was renamed WSDL 2.0 because of its substantial differences from WSDL 1.1. Some of these changes include:

  • Adding further semantics to the description language. This is one of the reasons for making targetNamespace a required attribute of the definitions element in WSDL 2.0.

  • Removal of message constructs. These are specified using the XML schema type system in the types element.

  • No support for operator overloading.

  • PortTypes renamed to interfaces. Support for interface inheritance is achieved by using the extends attribute in the interface element.

  • Ports renamed to endpoints.

WSDL 2.0 Conceptual Model

The description of a web service can be modeled in two parts. In the abstract part, WSDL describes a web service in terms of messages it sends and receives through a type system, typically W3C XML Schema. Message exchange patterns define the sequence and cardinality of messages. An operation associates message exchange patterns with one or more messages. An interface groups these operations in a transport and wire independent manner.

In the concrete part of the description, bindings specify the transport and wire format for interfaces. A service endpoint associates network address with a binding. Finally, a service groups the endpoints that implement a common interface. Figure 1 shows the conceptual WSDL component model.

Figure 1: WSDL Conceptual model

WSDL Components

WSDL provides a set of components and their associated properties for describing web services. Listing 2 shows the skeleton of the WSDL 2.0 description. The following section gives a brief overview about each of these components.

<definitions targetNamespace="xs:anyURI">
<documentation /> ?
[<import /> | <include /> ] *
<types /> ?
[<interface /> | <binding /> | <service /> ] *

Listing 2: WSDL 2.0 Skeleton


The definitions element is the root of any WSDL document. It serves as a container which holds all the necessary information about the service and its attributes. Figure 2 shows the schema for the definitions element. The targetNamespace attribute of the definitions element is a required attribute of type anyURI. The namespace can directly or indirectly define the semantics of the WSDL. Also, the definitions element can have other optional attributes which correspond to various namespaces that may be used with in the WSDL document.

Figure 2: definitions schema


The include element helps to modularize the web service descriptions so that separation of various service definition components from the same target namespace can be allowed to exist in another WSDL document which can be used or shared across web service descriptions. The location attribute is mandatory and specifies the location of these WSDL documents. The actual value of the target namespace of the included WSDL must match the target namespace of the definitions element in the including WSDL. Figure 3 shows the XML schema for the include element.

Figure 3: include schema

Pages: 1, 2, 3

Next Pagearrow