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 37. Customizing How Types are Generated
Abstract
37.1. Basics of Customizing Type Mappings Copiar enlaceEnlace copiado en el portapapeles!
Overview Copiar enlaceEnlace copiado en el portapapeles!
Namespace Copiar enlaceEnlace copiado en el portapapeles!
http://java.sun.com/xml/ns/jaxb. You must add a namespace declaration similar to the one shown in Example 37.1, “JAXB Customization Namespace”. This is added to the root element of all XML documents defining JAXB customizations.
Example 37.1. JAXB Customization Namespace
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
Version declaration Copiar enlaceEnlace copiado en el portapapeles!
jaxb:version attribute to the root element of the external binding declaration. If you are using in-line customization, you must include the jaxb:version attribute in the schema element containing the customizations. The value of the attribute is always 2.0.
jaxb:version attribute used in a schema element.
Example 37.2. Specifying the JAXB Customization Version
< schema ...
jaxb:version="2.0">
< schema ...
jaxb:version="2.0">
Using in-line customization Copiar enlaceEnlace copiado en el portapapeles!
xsd:appinfo element of the XML schema construct that is being modified.
Example 37.3. Customized XML Schema
Using an external binding declaration Copiar enlaceEnlace copiado en el portapapeles!
jaxb:bindings elements. Example 37.4, “JAXB External Binding Declaration Syntax” shows the syntax of an external binding declaration.
Example 37.4. JAXB External Binding Declaration Syntax
schemaLocation attribute and the wsdlLocation attribute are used to identify the schema document to which the modifications are applied. Use the schemaLocation attribute if you are generating code from a schema document. Use the wsdlLocation attribute if you are generating code from a WSDL document.
node attribute is used to identify the specific XML schema construct that is to be modified. It is an XPath statement that resolves to an XML Schema element.
widgetSchema.xsd, shown in Example 37.5, “XML Schema File”, the external binding declaration shown in Example 37.6, “External Binding Declaration” modifies the generation of the complex type size.
Example 37.5. XML Schema File
Example 37.6. External Binding Declaration
-b binding-file option, as shown below:
wsdl2java -b widgetBinding.xml widget.wsdl
wsdl2java -b widgetBinding.xml widget.wsdl