Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] [MOXy] xml choice object mapping incompatible with preserve document option?


I am trying to use XML Choice Mapping to map a hierarchy of objects.  I find
that when I turn on the "preserve document" option, this mapping fails.  As
soon as I turn off the "preserve document" option, this mapping works fine. 
Is this a bug or are they incompatible for some reason?  Or is it because of
the XML Any Collection Mapping that is also under the same element that is

Here is my XML for configuring the choice mapping.  Please let me know if
it's wrong, because the workbench does not generate this kind of mapping, so
I figured out the format by browsing the source code and hacking the mapping
until it worked.

            <attribute-mapping xsi:type="xml-choice-object-mapping">
                  <xml-field name="DataArea/A" xsi:type="node" />
                  <xml-field name="DataArea/B" xsi:type="node" />
                  <xml-field name="DataArea/C" xsi:type="node" />

Here's the any collection:
            <attribute-mapping xsi:type="xml-any-collection-mapping">
               <field name="DataArea/" xsi:type="node"/>
               <container xsi:type="list-container-policy">

Any insight would be greatly appreciated!


View this message in context:
Sent from the EclipseLink - Users mailing list archive at

Back to the top