JAXB Wizard and Code-Seeder Palette User's Guide

ProcedureTo Generate Code Using the Constructs JAXB Object

  1. Drag and drop the Constructs JAXB Object icon into the IDE editor of an existing project.

    The Generate JAXB Constructs code dialog box is displayed.

    Figure 2 JAXB Constructs Object

    JAXB Constuct

  2. Enter the JAXB class name with the package name to be instantiated/initialized. You can also use the Find button to search for the class (as shown below).

    Figure 3 Find Class Type

    Find JAXB Type

  3. Enter a sample XML file (if available) for the initialization code to use. Update the auto generated method name if required.

    Figure 4 Providing Sample XML File

    Sample XML File

  4. Assuming the XML file conforms to the schema used in generating JAXB classes, a method will be created (as shown below).

    Figure 5 Successful Method Created

    Method creation

    If the sample XML file is not provided, the code generated will not populate the default values (as shown below).

    Figure 6 Unpopulated Method

    unsuccessful Method creation