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

Configuring an XML Mapping (ELUG)

Revision as of 20:35, 29 November 2007 by Rick.sapir.oracle.com (Talk | contribs) (Introduction to XML Mapping Configuration)

This section describes how to configure an XML mapping.

For information on how to configure EclipseLink mappings options common to two or more mapping types, see Configuring a Mapping.


Introduction to XML Mapping Configuration

This table lists the types of XML mappings that you can configure and provides a cross-reference to the type-specific chapter that lists the configurable options supported by that type.


Configuring XML Mappings

Mapping Type See Also...

XML direct mapping (see XML Direct Mapping)

Configuring an XML Direct Mapping

XML composite direct collection mapping (see XML Composite Direct Collection Mapping)

Configuring an XML Composite Direct Collection Mapping

XML composite object mapping (see XML Composite Object Mapping)

Configuring an XML Composite Object Mapping

XML composite collection mapping (see XML Composite Collection Mapping)

Configuring an XML Composite Collection Mapping

XML any object mapping (see XML Any Object Mapping)

Configuring an XML Any Object Mapping

XML any collection mapping (see XML Any Collection Mapping)

Configuring an XML Any Collection Mapping

XML transformation mapping (see XML Transformation Mapping

Configuring an XML Transformation Mapping


For more information, see the following:

Configuring Common XML Mapping Options

#Table 59-2 lists the configurable options shared by two or more XML mapping types. In addition to the configurable options described here, you must also configure the options described for the specific XML Mapping Types, as shown in #Table 59-1.


Table 59-2 Common Options for XML Mappings

Option EclipseLink Workbench Java

Configuring XPath

Supported

Supported

#Configuring Reference Descriptor

Supported

Supported

Configuring Container Policy

Supported

Supported

Configuring Method or Direct Field Accessing at the Mapping Level

Supported

Supported

Configuring a Mapping

Supported

Supported

#Configuring Maps to Wildcard

Supported

Unsupported

Configuring a Serialized Object Converter

Supported

Supported

Configuring a Type Conversion Converter

Supported

Supported

Configuring an Object Type Converter

Supported

Supported

Configuring a Simple Type Translator

Supported

Supported

Configuring the Use of a Single Node

Supported

Supported

Configuring the Use of a Single Node

Unsupported

Supported


Configuring Reference Descriptor

For XML attributes that reference other descriptors (instead of a schema element), you may select a specific reference descriptor. If you do not specify a reference descriptor, EclipseLink uses the xsi:Type attribute to determine the reference class object.

#Table 59-3 summarizes which XML mappings support reference descriptor configuration.


Table 59-3 XML Mapping Support for Reference Descriptor Configuration

XML Mapping #How to Configure a Reference Descriptor Using Workbench
How to Use Java

XML direct mapping (see XML Direct Mapping)

Unsupported

Unsupported

XML composite direct collection mapping (seeXML Composite Direct Collection Mapping)

Unsupported

Unsupported

XML composite object mapping (see XML Composite Object Mapping)

Supported

Supported

XML composite collection mapping (see XML Composite Collection Mapping)

Supported

Supported

XML any object mapping (see XML Any Object Mapping)

Unsupported

Unsupported

XML any collection mapping (see XML Any Collection Mapping)

Unsupported

Unsupported

XML transformation mapping (see XML Transformation Mapping)

Unsupported

Unsupported


How to Configure a Reference Descriptor Using Workbench

To specify a reference descriptor for an XML mapping that references another descriptor (instead of a schema element), use this procedure.

  1. Select the mapped attribute in the Navigator. Its properties appear in the Editor.
  2. Click the General tab. The General tab appears.Figure 59-1 General Tab, Reference Descriptor FieldDescription of Figure 59-1 follows
    [img_text/xmlrefd.htm Description of "Figure 59-1 General Tab, Reference Descriptor Field"]

If this XML attribute refers to another descriptor (instead of a schema element), use the Reference Descriptor field to select a descriptor in the project.

See Also

#Configuring Reference Descriptor

Configuring Maps to Wildcard

This attribute applies only to the Workbench. Use this option to solve "No XPath specified" problems (see How to Use the Problems Window) for an XML mapping that does not need an XPath (see Configuring XPath) for it maps to a wildcard.

If the XML mapping is owned by an anyType descriptor (see Configuring for Complex Type of anyType), it cannot map to a wildcard, and you must specify an XPath.

#Table 59-4 summarizes which XML mappings support maps to wildcard configuration.


Table 59-4 XML Mapping Support for Maps to Wildcard Configuration

XML Mapping #How to Configure Maps to Wildcard Using Workbench How to Use Java

XML direct mapping (see XML Direct Mapping)

Supported

Supported

XML composite direct collection mapping (see XML Composite Direct Collection Mapping)

Supported

Supported

XML composite object mapping (see XML Composite Object Mapping)

Supported

Supported

XML composite collection mapping (see XML Composite Collection Mapping)

Supported

Supported

XML any object mapping (see XML Any Object Mapping)

Supported

Supported

XML any collection mapping (see XML Any Collection Mapping)

Supported

Supported

XML transformation mapping (see XML Transformation Mapping)

Supported

Supported


How to Configure Maps to Wildcard Using Workbench

To specify a map a schema element using the xs:any declaration, use this procedure.

  1. Select the mapped attribute in the Navigator. Its properties appear in the Editor.
  2. Figure 59-2 Mapping Tab, Maps to Wildcard Option
    Mapping Tab, Maps to Wildcard Option

If the XML mapping is not owned by an anyType descriptor (see Configuring for Complex Type of anyType) and maps to a wildcard, then you do not need to specify an XPath (see Configuring XPath). Select the Maps to Wildcard (uses "any" tag) option to clear the missing XPath neediness message.

If the XML mapping is owned by an anyType descriptor, it cannot map to a wildcard and you must specify an XPath. Deselect the Maps to Wildcard (Uses "any" tag) option and ensure that you specify an XPath.

See Also

#Configuring Maps to Wildcard



Copyright Statement

Back to the top