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

Creating an XML Descriptor (ELUG)

Revision as of 08:25, 21 November 2007 by Rick.sapir.oracle.com (Talk | contribs) (New page: <div style="float:right;border:1px solid #000000;padding:5px">__TOC__ Related Topics</div> This section explains how to create d...)

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

This section explains how to create descriptor options specific to an XML descriptor.

For information on how to create more than one type of descriptor, see Creating a Descriptor.


Introduction to XML Descriptor Creation

After you create a descriptor, you must configure its various options (see Configuring a Descriptor) and use it to define mappings.

For complete information on the various types of mapping that EclipseLink supports, see Introduction to Mappings and Creating a Mapping.

For complete information on the various types of descriptor that EclipseLink supports, see Descriptor Types.

For more information, see the following:


Creating an XML Descriptor

You can create an XML descriptor using the Workbench (see [|How to Create an XML Descriptor Using Workbench]]) or Java code (see [|How to Create an XML Descriptor Using Java]]). We recommend that you use the Workbench to create and manage your XML descriptors.


How to Create an XML Descriptor Using Workbench

XML descriptor icon When you add a class to an XML project (see Configuring Project Classpath), Workbench creates an XML descriptor for the class.

An XML descriptor is always a composite type.


How to Create an XML Descriptor Using Java

This example shows how to create an XML descriptor using Java code.


Creating an XML Descriptor in Java

XMLDescriptor descriptor = new XMLDescriptor();
descriptor.setJavaClass(YourClass.class);


Note: Use the org.eclipse.persistence.ox.XMLDescriptor class. Do not use the deprecated org.eclipse.persistence.internal.xml.XMLDescriptor class.



Copyright Statement

Back to the top