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>
<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:
definitions .targetNamespace
attribute information item as described below
in
2.1.2.1 targetNamespace attribute information
item.documentation element
information item (see
5. Documentation).include element
information items (see
4.1 Including Descriptions)import element
information items (see
4.2 Importing Descriptions)types element
information item (see
3. Types).interface element information
items (see
2.2.2 XML Representation of Interface
Component).binding element information
items (see
2.8.2 XML Representation of Binding
Component).service element information
items (see
2.12.2 XML Representation of Service
Component).targetNamespace attribute
information itemThe 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:
targetNamespaceThe type of the targetNamespace
attribute information item is
xs:anyURI.
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 |
|
{bindings} |
The binding definitions corresponding to all
the |
|
{services} |
The service definitions corresponding to all
the |
|
{element declarations} |
The element declaration components
corresponding to all the element declarations
defined as descendants of the
|