Stylus Studio XML Editor

Table of contents

Appendices

4.2 Importing Descriptions

Importing Descriptions

The WSDL import element information item, like the include element information item (see [Including Descriptions]) also allows for the separation of the different components of a WSDL description into independent descriptions, but in this case with different target namespaces, which can be imported as needed. This technique helps writing clearer WSDL descriptions, by separation the definitions according to their level of abstraction, and maximizes reusability.

The WSDL import element information item is modeled after the XML Schema import element information item (see [XMLSchemaP1], section 4.2.3 "References to schema components across namespaces"). Specifically it can be used to import components from WSDL descriptions that do not share a target namespace with the importing document. Components in imported descriptions are part of the component model of the importing description. The imported components can be referenced by QName. Using the import construct is a necessary condition for making components from another namespace available to a WSDL description. That is, a WSDL description cannot refer to components in a namespace other that the target namespace unless an import statement for that namespace is present.

The import element information item has:

  • A [local name] of import.

  • A [namespace name] of http://www.w3.org/2003/03/wsdl.

  • An attribute information item which has:

    • A [local name] of namespace.

    • A [namespace name] which has no value.

    The namespace attribute information item is of type xs:anyURI. Its actual value indicates that the containing WSDL document can contain qualified references to WSDL definitions in that namespace (via one or more prefixes declared with namespace declarations in the normal way). This value MUST NOT match the actual value of the enclosing WSDL document targetNamespace attribute information item. If the import statement results in the import of a WSDL document then the actual value of the namespace attribute information item MUST be identical to the actual value of the imported WSDL document's targetNamespace attribute information item.

  • An OPTIONAL attribute information item which has:

    • A [local name] of location.

    • A [namespace name] which has no value.

    The location attribute information item is of type xs:anyURI. Its actual value is the location of some information for the namespace identified by the namespace attribute information item.

    The location attribute information item is optional to allow WSDL components to be constructed from information other than serialized XML 1.0 and to allow for WSDL processors that have a priori knowledge of certain namespaces.