Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

EclipseLink/Examples/MOXy/NativeOxmJaxbContext

< EclipseLink‎ | Examples‎ | MOXy
Revision as of 14:00, 31 January 2008 by Rick.sapir.oracle.com (Talk | contribs) (linked to elug)

Map Your Objects using EclipseLink's Native OXM

EclipseLink offers meet-in-the-middle object-to-XML mapping. This allows you to map an existing Java objects to an existing XML schema. This can be done programmatically or visually using our mapping editor.

See Configuring an XML Mapping (ELUG) in the EclipseLink User's Guide for complete information.

Create a sessions.xml File

Create a sessions.xml file. There are two vital pieces of information to capture:

  • The name of the session -- This name must correspond to the context path you wish to use when creating the JAXBContent.
  • The location of your mapping metadata.


See Creating a Session (ELUG) in the EclipseLink User's Guide for complete information.

Create the JAXBContext

Create the JAXBContext using the context path option:

Code Example
JAXBContext.newInstance("com.example.model");

Back to the top