Hello,
i use EclipseLink MOXy to convert Data from a DAO Interface to XML.
So i use MOXy like this: blog.bdoughan.com/2010/07/moxy-jaxb-map-interfaces-to-xml.html
Most of the interfaces i want map inherit another interface.
example: public interface ISubject extends IObject, IExtendedAttributeAware ...
The interface IExtendedAttributeAware defines some methods i need for mapping.
so my xml binding file contains something like this:
...
<java-types>
<java-type name="de.unituebingen.medizin.uak.ergexplorer.interfaces.IExtendedAttributeAware" xml-transient="true"/>
<java-type name="de.unituebingen.medizin.uak.ergexplorer.interfaces.ISubject">
<xml-type factory-class="de.biomedengineering.elvisml.presley.processor.ObjectFactory" factory-method="createISubject"/>
<java-attributes>
<xml-attribute java-attribute="normal" name="normal"/>
<xml-element java-attribute="uniqueId" xml-path="elvis:ExternalIdentifier/text()"/>
<xml-element java-attribute="firstName" xml-path="elvis:Firstname/text()"/>
<xml-element java-attribute="lastName" xml-path="elvis:Lastname/text()"/>
...
<xml-element java-attribute="extendedAttribute" xml-path="elvis:ExtendedAttributes/elvis:Attribute/text()"/>
</java-attributes>
</java-type>
</java-types>
...
It works for all attibutes whose methods defined in "ISubject", but the methods for "extendedAttribute" are defined in IExtendedAttributeAware so i got the message:
[EL Warning]: 2012-01-05 18:30:02.308--Ignoring attribute [extendedAttribute] on class [de.unituebingen.medizin.uak.ergexplorer.interfaces.ISubject] as no Property was generated for it.
I use "xml-transient" attribute like at this page:
www.eclipse.org/forums/index.php/t/205662/
I tested it with classes and it works fine, but it looks like i cant use it with interfaces.
So how can i use MOXy with inherited interfaces?
Thanks And Regards
Manuel Glaser
[Updated on: Thu, 05 January 2012 19:14]
Report message to a moderator