Jump to: navigation, search

Difference between revisions of "EclipseLink/Examples/MOXy/NativeOxmJaxbContext"

m (Create a sessions.xml file)
m (linked to elug)
Line 1: Line 1:
 
== Map Your Objects using EclipseLink's Native OXM ==
 
== 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.
 
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/UserGuide|EclipseLink User's Giude]]'' for complete information.
  
 
== Create a sessions.xml File ==
 
== Create a sessions.xml File ==

Revision as of 12:56, 31 January 2008

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 Giude for complete information.

Create a sessions.xml File

Create a sessions.xml file. There are two vital pieces of information to capture. The first is the name of the session, this name must correspond to the context path you wish to use when creating the JAXBContent. The second is the location of your mapping metadata.

Create the JAXBContext

Create the JAXBContext using the context path option:

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