background image

JAXB Compiler Options

<< JAXB Examples | xjc Command-Line Options >>
<< JAXB Examples | xjc Command-Line Options >>
16
U
SING
JAXB
3. Compiles the schema-derived JAXB classes or the annotated Java code.
4. Runs the
Main
class for the example.
The schema-derived JAXB classes and how they are bound to the source schema
is described in About the Schema-to-Java Bindings (page 19). The methods used
for building and processing the Java content tree are described in Basic
Examples (page 29).
JAXB Compiler Options
The JAXB XJC schema binding compiler transforms, or binds, a source XML
schema to a set of JAXB content classes in the Java programming language. The
compiler,
xjc
, is provided in two flavors in the Application Server:
xjc.sh
(Solaris/Linux) and
xjc.bat
(Windows). Both
xjc.sh
and
xjc.bat
take the
same command-line options. You can display quick usage instructions by invok-
ing the scripts without any options, or with the
-help
switch. The syntax is as
follows:
xjc [-options ...] <schema>
The
xjc
command-line options are listed in Table 3­4.
Table 3­4
xjc
Command-Line Options
Option or
Argument
Description
-nv
Do not perform strict validation of the input schema(s). By default,
xjc
performs strict validation of the source schema before process-
ing. Note that this does not mean the binding compiler will not per-
form any validation; it simply means that it will perform less-strict
validation.
-extension
By default, the XJC binding compiler strictly enforces the rules out-
lined in the Compatibility chapter of the JAXB Specification. In the
default (strict) mode, you are also limited to using only the binding
customizations defined in the specification. By using the
-exten-
sion
switch, you will be allowed to use the JAXB Vendor Exten-
sions.