|MOXy support for inheritance (Java -> XML) [message #658209]
||Mon, 07 March 2011 12:26
| Xavier Coulon
Registered: July 2009
I'm currently evaluating MOXy in the case of unmarshalling an input XML fragment file into a Java class (or set of classes).
The Java class itself inherits from generic business classes, and most of the properties/attributes belong to the superclasses. Since i cannot modify those business classes, I use the external metadata facility provided by MOXy to configure the XML->Java mappings.
Here's a sample of that metadata config file:
<?xml version="1.0" encoding="UTF-8"?>
<xml-root-element name="stock" />
<xml-type name="stock" />
Starting a JUnit test case, I get the following warning message :
Ignoring attribute [ref] on class [xyz.integration.stocks.domain.IntegrationStock] as no Property was generated for it
As expected from the message above, the mapping is skipped and my result class property 'ref' is null...
How can I tell MOXy to support such an inheritance ?
Thank you in advance.
Powered by FUDForum
. Page generated in 0.01855 seconds