Using Wizards in the JBuilder Environment

jAllora provides two wizards for use in the JBuilder environment. Each wizard generates Java source files for a sample application that demonstrates how to use jAllora for XML-RDB data conversion and manipulation.

Running the Wizards

  1. Make sure you have set up your JBuilder environment correctly to run the wizards. You need a JDBC driver installed and configured before you can use the wizards.

  2. Make sure you have an open JBuilder project. Wizard creation fails if there is no open project.

  3. In the JBuilder window, from the main menu, choose Wizards, then select the wizard you want to use. Use the description below to help you choose.

  4. Enter information in the wizard dialogs to generate sample code.

 

Marshal Data from RDB to XML

 

This wizard generates code that transforms RDB data to XML either using a mapping file generated from the Mapper or using a HiT's recordset schema. The wizard provides options a number of output options including a DOM, a JMS queue and XSL. You can also choose to generate code the performs the transformation on the whole document (MarshalXMLStream), record by record (Marshal) or using a databinding approach.

Unmarshal Data from XML to RDB

 

This wizard generates code that inserts XML data in a relational database either using a mapping file generated from the Mapper or using a HiT's recordset schema. The wizard provides options a number of input options including a DOM and a JMS queue. You can also choose to generate code the performs the insert on the whole document (UnmarshalXMLStream), record by record (Unmarshal) or using a databinding approach.

 

 

 

Compiling and Running the Sample Code

  1. From the Project menu, choose Project Properties.

  2. In the Paths tab, select the Required Libraries tab.

  3. Make sure the following jar files are included:
    jallora.jar
    schema.jar
    gnu-regexp.jar
    jAlloraLicense.jar
    jaxp-api.jar
    dom.jar
    sax.jar
    xalan.jar
    xercesImpl.jar (only if you are performing XSL transformations in your sample applications)
    xsltc.jar (only if you are performing XSL transformations in your sample applications)
    jms.jar (only if you are generating the sample applications that use JMS)

  4. If you do not see these on the Required Libraries tab, you need to add them:

  5. Select the project in the main JBuilder window.

  6. Right-click and select Make from the menu.

  7. Select the sample application source file in the Project tree.

  8. Right-click and select Run from the menu.

  9. View the trace file generated by the application for more information about the sample application and jAllora. The default location for the trace file is trace.trc in the root directory.