Web Services Description Language (WSDL) Version 2.0 Part 1: Core Language

2. Component Model

2.1 Definitions Component

At the abstract level, the Definitions component is just a container for two categories of component; WSDL components and type system components.

WSDL components are interfaces, bindings and services.

Type system components are element declarations and type definitions drawn from some type system. The former define the [local name], [namespace name], [children] and [attributes] properties of an element information item; the latter define only the [children] and [attributes] properties.

The properties of the Definitions component are as follows:

The set of interfaces/binding/services/etc. available in the Definitions component include those that are defined within the component itself and those that are imported and/or included. Note that at the component model level, there is no distinction between directly defined components vs. imported/included components.

The components directly defined within a single Definitions component are said to belong to the same target namespace. The target namespace therefore groups a set of related component definitions and provides a hint of the intended semantics of the components.

Note:

It is RECOMMENDED that the value of the targetNamespace attribute information item SHOULD be a dereferencible URI and that it resolve to a WSDL document which provides service description information for that namespace.

If the service description is split into multiple documents (which may be combined as needed via 4.1 Including Descriptions), then the targetNamespace attribute information item SHOULD resolve to a master document which includes all the WSDL documents for that namespace. This approach enables the WSDL component designators' fragment identifiers to be properly resolvable.

Imported components have different target namespace values from the Definitions component that is importing them. Thus importing is the mechanism to use components from one namespace in another set of definitions.

Each WSDL or type/element component MUST be uniquely identified by its qualified name. That is, if two distinct components of the same kind (Interface, Binding etc.) are in the same target namespace, then their QNames MUST be unique. However, different kids of components (e.g., an Interface component and a Binding component) MAY have the same QName. Thus, QNames of components must be unique within the space of those components in a given target namespace.

In addition to WSDL components and type and element components, additional extension components MAY be added via extensibility 6. Language Extensibility. Further, additional properties to WSDL and type/element components MAY also be added via extensibility.

The definitions component is represented in XML as:

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

A. Component Model XML/InfoSet Bindings - Normative

A.1 Definitions

A.1.1 XML Representation of Definitions Component

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

WSDL definitions are represented in XML by one or more WSDL Information Sets (Infosets), that is one or more definitions element information items. A WSDL Infoset contains representations for a collection of WSDL components which share a common target namespace. A WSDL Infoset which contains one or more import element information items 4.2 Importing Descriptions corresponds to a collection with components drawn from multiple target namespaces.

The target namespace represents an unambiguous name for the intended semantics of the WSDL Infoset. The targetNamespace URI SHOULD point to a human or machine processable document that directly or indirectly defines the semantics of the WSDL Infoset.

The definitions element information item has the following Infoset properties:

A.1.1.1 targetNamespace attribute information item

The targetNamespace attribute information item defines the namespace affiliation of top-level components defined in this definitions element information item. Interfaces, Bindings and Services are top-level components.

The targetNamespace attribute information item has the following Infoset properties:

The type of the targetNamespace attribute information item is xs:anyURI.

A.1.2 Mapping Definitions' XML Representation to Component Properties

The mapping between the properties of the Definitions component (see 2.1.1 The Definitions Component) and the XML Representation of the definitions element information item (see 2.1.2 XML Representation of Definitions Component) is described in Table 2-1.

Table 2-1. Mapping between Definitions Component Properties and XML Representation

Property

Mapping

{interfaces}

The interface definitions corresponding to all the interface element information items in the [children] of the definitions element information item, if any, plus any included or imported interface definitions (see 4. Modularizing WSDL descriptions).

{bindings}

The binding definitions corresponding to all the binding element information items in the [children] of the definitions element information item, if any, plus any included or imported binding definitions (see 4. Modularizing WSDL descriptions).

{services}

The service definitions corresponding to all the service element information items in the [children] of the definitions element information item, if any, plus any included or imported service definitions (see 4. Modularizing WSDL descriptions).

{element declarations}

The element declaration components corresponding to all the element declarations defined as descendants of the types element information item, if any, plus any imported element definitions. At a minimum this will include all the global element declarations defined by XML Schema element element information items. It MAY also include any definition from some other type system which describes the [local name], [namespace name], [attributes] and [children] properties of an element information item.