Tuesday, 17 March 2009

Jaxb notes: specifying a package for a classes generated from a schema

Use the <package> element of the <schemaBindings> binding declaration
to define the package name for the schema.

For example, the following defines the package name for all JAXB
classes generated from the simpleservice.xsd file:

<jaxb:bindings
xmlns:xs="http://www.w3.org/2001/XMLSchema"
schemaLocation="simpleservice.xsd"
node="/xs:schema">
<jaxb:schemaBindings>
<jaxb:package name="examples.jaxb"/>
</jaxb:schemaBindings>
</jaxb:bindings>


Taken from http://edocs.bea.com/wls/docs103/webserv/data_types.html#wp223112

No comments: