LibraryLink ToToggle FramesPrintFeedback

Including and Importing Schema Definitions

FUSE Services Framework supports the including and importing of schema definitions, using the <include/> and <import/> schema tags. These tags enable you to insert definitions from external files or resources into the scope of a schema element. The essential difference between including and importing is:

The include directive has the following syntax:

The referenced schema, given by anyURI, must either belong to the same target namespace as the enclosing schema, or not belong to any target namespace at all. If the referenced schema does not belong to any target namespace, it is automatically adopted into the enclosing schema’s namespace when it is included.

Example 10.1 shows an example of an XML Schema document that includes another XML Schema document.


Example 10.2 shows the contents of the included schema file.


The import directive has the following syntax:

The imported definitions must belong to the namespaceAnyURI target namespace. If namespaceAnyURI is blank or remains unspecified, the imported schema definitions are unqualified.

Example 10.3 shows an example of an XML Schema that imports another XML Schema.


Example 10.4 shows the contents of the imported schema file.


Using types defined in a schema document that is not referenced in the service's WSDL document is a three step process:

  1. Convert the schema document to a WSDL document using the xsd2wsdl tool.

  2. Generate Java for the types using the wsdl2java tool on the generated WSDL document.

    [Important]Important

    You will get a warning from the wsdl2java tool stating that the WSDL document does not define any services. You can ignore this warning.

  3. Add the generated classes to your classpath.