Create Java™ Architecture
for XML Binding (JAXB) Java object
classes by using the JAXB 2.0 schema compiler from a command window.
Before you begin
- You must create a message model schema file; see Constructing message models.
- You might need to add the bin folder of the IBM® Java SDK to your system path. The bin folder
of the IBM Java SDK that is included with IBM Integration Bus at install_dir\common\jdk\bin.
About this task
To generate JAXB Java object
classes from your message model schema files by using an IBM Integration Bus command window, complete the
following steps:
Procedure
- In the Application Development view, right-click
the message model schema file that you want to use to generate your
JAXB Java object classes and
select Properties.
A window
opens that shows the properties for your selected message model schema
file.
- Note the Location of your message model
schema file, then click OK to close the properties
window.
- In the Application Development view, expand
the Java project that you want
to contain your JAXB Java object
classes, then Right-click the src folder and
select Properties.
A window
opens that shows the properties for your selected src folder.
- Note the Location of your selected src folder,
then click OK to close the properties window.
- Open an IBM Integration Bus command
window. If you have not added the bin folder
of the IBM Java SDK to your system path, change directory
to this folder. The bin folder of the IBM Java SDK that is included with the IBM Integration Toolkit is located at install_dir\common\jdk\bin
- Optional: To view a full list of commands for
the JAXB 2.0 schema compiler, enter the following command:
- Enter the following command to create your JAXB Java object classes:
xjc MessageModelSchema -d JavaProject -p JavaPackage
Where
MessageModelSchema is
the location of your message model schema file,
JavaProject is
the location of the
src folder of your Java project, and
JavaPackage is
the Java package where the generated
classes are placed.
The JAXB 2.0 schema compiler
generates JAXB Java object classes
from your message model schema file, and saves them to the src folder
of the Java project that you
specified in the command.
- In the IBM Integration Toolkit, open
the Package Explorer view:
- Click
- In the Show View window, expand Java and
select Package Explorer, then click OK.
- In the Package Explorer view, right-click
the Java project that you selected
to contain your JAXB Java object
classes and select Refresh.
Results
Your JAXB Java object
classes are visible in the Application Development view,
under the src folder of your Java project.