LibraryToggle FramesPrintFeedback

When you cannot, or do not want to, make changes to the XML Schema document that defines your type, you can specify the customizations using an external binding declaration. An external binding declaration consists of a number of nested jaxb:bindings elements. Example 15.4 shows the syntax of an external binding declaration.


The 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.

The 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.

Given the schema document widgetSchema.xsd, shown in Example 15.5, the external binding declaration shown in Example 15.6 modifies the generation of the complex type size.



To instruct the code generators to use the external binging declaration use the wsdl2java tool's -b binding-file option, as shown below:

wsdl2java -b widgetBinding.xml widget.wsdl
Comments powered by Disqus
loading table of contents...