Fuse 6 is no longer supported
As of February 2025, Red Hat Fuse 6 is no longer supported. If you are using Fuse 6, please upgrade to Red Hat build of Apache Camel.Este contenido no está disponible en el idioma seleccionado.
Chapter 32. Basic Data Binding Concepts
Abstract
32.1. Including and Importing Schema Definitions Copiar enlaceEnlace copiado en el portapapeles!
Overview Copiar enlaceEnlace copiado en el portapapeles!
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:
- Including brings in definitions that belong to the same target namespace as the enclosing schema element.
- Importing brings in definitions that belong to a different target namespace from the enclosing schema element.
xsd:include syntax Copiar enlaceEnlace copiado en el portapapeles!
<include schemaLocation="anyURI" />
<include schemaLocation="anyURI" />
Example 32.1. Example of a Schema that Includes Another Schema
Example 32.2. Example of an Included Schema
xsd:import syntax Copiar enlaceEnlace copiado en el portapapeles!
<import namespace="namespaceAnyURI" schemaLocation="schemaAnyURI" />
<import namespace="namespaceAnyURI"
schemaLocation="schemaAnyURI" />
Example 32.3. Example of a Schema that Imports Another Schema
Example 32.4. Example of an Imported Schema
Using non-referenced schema documents Copiar enlaceEnlace copiado en el portapapeles!
- Convert the schema document to a WSDL document using the xsd2wsdl tool.
- Generate Java for the types using the wsdl2java tool on the generated WSDL document.ImportantYou will get a warning from the wsdl2java tool stating that the WSDL document does not define any services. You can ignore this warning.
- Add the generated classes to your classpath.