Jump to: navigation, search


< EclipseLink‎ | Examples‎ | SDO
Revision as of 11:25, 24 February 2009 by Blaise.doughan.oracle.com (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


The following example will demonstrate how to use EclipseLink's SDO functionality to:

  • Generate Java source files from an XML Schema using the SDO Compiler


  1. Ensure that you have EclipseLink correctly installed and configured for your environment. Please see EclipseLink/Installing and Configuring EclipseLink for more information.

Running the SDO Compiler

The SDO compiler can be run to generate Static SDO Java files from an XML Schema:

<ECLIPSELINK_HOME>/eclipselink/bin/sdo-compiler.sh [-options]
<ECLIPSELINK_HOME>\eclipselink\bin\sdo-compiler.cmd [-options]
   -help                        Prints the help message text
   -sourceFile <filename>       The input schema file (required)
   -targetDirectory <dirname>   The directory to generate Java source (optional)
   -logLevel <level>            Specify the integer value of the logging level
   sdo-compiler.sh -sourceFile config/Customer.xsd -targetDirectory sdo-compiler-output -logLevel 8

For each complex type in the schema, the compiler will generate both an interface (e.g. CustomerType.java), and a concrete implementation which subclasses org.eclipse.persistence.sdo.SDODataObject (e.g. CustomerTypeImpl.java).