WebSphere Message Broker, Version 8.0.0.7 Operating Systems: AIX, HP-Itanium, Linux, Solaris, Windows, z/OS

See information about the latest product version

Creating JAXB Java object classes by using the JAXB 2.0 schema compiler

Create Java™ Architecture for XML Binding (JAXB) Java object classes by using the JAXB 2.0 schema compiler from a command window.

Before you start:
  • 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 the WebSphere Message Broker Toolkit at RootInstallationDirectory\WMBT800\jdk\bin.

To generate JAXB Java object classes from your message model schema files by using a WebSphere Message Broker command window, complete the following steps:

  1. In the Broker 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.
  2. Note the Location of your message model schema file, then click OK to close the properties window.
  3. In the Broker 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.
  4. Note the Location of your selected src folder, then click OK to close the properties window.
  5. Open a WebSphere Message Broker 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 WebSphere Message Broker Toolkit is located at RootInstallationDirectory\WMBT800\jdk\bin
  6. Optional: To view a full list of commands for the JAXB 2.0 schema compiler, enter the following command:
    xjc -help
  7. 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.
  8. In the WebSphere Message Broker Toolkit, open the Package Explorer view:
    1. Click Window > Show view > Other...
    2. In the Show View window, expand Java and select Package Explorer, then click OK.
  9. In the Package Explorer view, right-click the Java project that you selected to contain your JAXB Java object classes and select Refresh.
Your JAXB Java object classes are visible in the Broker Development view, under the src folder of your Java project.
Next:
Notices | Trademarks | Downloads | Library | Support | Feedback

Copyright IBM Corporation 1999, 2016Copyright IBM Corporation 1999, 2016.

        
        Last updated:
        
        Last updated: 2016-05-23 14:48:00


Task topicTask topic | Version 8.0.0.7 | bc40814_.dita