Stylus Studio XML Editor

Table of contents

Appendices

2.1 Definitions

Definitions

The Definitions Component[top]

The Definitions Component

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

WSDL components are interfaces, bindings and services.

Type system components describe the constraints on a message's content. By default, these constraints are expressed in terms of the [XMLInfoSet], i.e. they define the [local name], [namespace name], [children] and [attributes] properties of an element information item. Type systems based upon other data models are generally accommodated by extensions to WSDL; see [Language Extensibility]. In the case where they define information equivalent to that of a XML Schema global element declaration, they can more simply be treated as if they were such a declaration.

The properties of the Definitions component are as follows:

  • {interfaces} OPTIONAL. A set of Interface components.

  • {bindings} OPTIONAL. A set of Binding components.

  • {services} OPTIONAL. A set of Service components.

  • {element declarations} OPTIONAL. A set of named element declarations, each one isomorphic to a global element declaration as defined by XML Schema.

  • {type definitions} OPTIONAL. A set of named type definitions, each one isomorphic to a global type definition as defined by XML Schema.

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 represents an unambiguous name for the intended semantics of the collection of components. The target namespace URI SHOULD point to a human or machine processable document that directly or indirectly defines the intended semantics of those components.

Note that 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 a service description is split into multiple documents (which may be combined as needed via [Including Descriptions]), then the targetNamespace attribute information item SHOULD resolve to a master document which includes all the WSDL documents needed for that service description. 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 system 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 kinds 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 system components, additional extension components MAY be added via extensibility [Language Extensibility]. Further, additional properties to WSDL and type system components MAY also be added via extensibility.

XML Representation of Definitions Component[top]

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 [Importing Descriptions] corresponds to a collection with components drawn from multiple target namespaces.

The targetNamespace URI MUST be an absolute URI (see [RFC2396]).

The definitions element information item has the following Infoset properties:

  • A [local name] of definitions.

  • A [namespace name] of http://www.w3.org/2004/08/wsdl.

  • One or more attribute information items amongst its [attributes] as follows:

    • A REQUIRED targetNamespace attribute information item as described below in [ ].

    • Zero or more namespace qualified attribute information items. The [namespace name] of such attribute information items MUST NOT be http://www.w3.org/2004/08/wsdl.

  • Zero or more element information items amongst its [children], in order as follows:

    1. An OPTIONAL documentation element information item (see [Documentation]).

    2. Zero or more element information items from among the following, in any order:

      • Zero or more include element information items (see [Including Descriptions])

      • Zero or more import element information items (see [Importing Descriptions])

      • Zero or more namespace-qualified element information items. The [namespace name] of such element information items MUST NOT be http://www.w3.org/2004/08/wsdl.

    3. An OPTIONAL types element information item (see [Types]).

    4. Zero or more element information items from among the following, in any order:

targetNamespace attribute information item[top]

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:

  • A [local name] of targetNamespace

  • A [namespace name] which has no value

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

Mapping Definitions' XML Representation to Component Properties[top]

Mapping Definitions' XML Representation to Component Properties

The mapping between the properties of the Definitions component (see [The Definitions Component]) and the XML Representation of the definitions element information item (see [XML Representation of Definitions Component]) is described in [tab_Definitions_Mapping].

1tab_Definitions_Mapping Mapping between Definitions Component Properties and XML Representation Property Mapping
11{interfaces} 11 The set of Interface components 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 components (see [Modularizing WSDL descriptions]).
11{bindings} 11 The set of Binding components 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 components (see [Modularizing WSDL descriptions]).
11{services} 11 The set of Service components 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 components (see [Modularizing WSDL descriptions]).
11{element declarations} 11 The set of element declarations corresponding to all the element declarations defined as descendants of the types element information item, if any, plus any imported element declarations. At a minimum this will include all the global element declarations defined by XML Schema element element information items. It MAY also include any declarations from some other type system which describes the [local name], [namespace name], [attributes] and [children] properties of an element information item.