Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » binding attributes from inherited interfaces
binding attributes from inherited interfaces [message #775305] Thu, 05 January 2012 13:38 Go to next message
Manuel Glaser is currently offline Manuel Glaser
Messages: 2
Registered: January 2012
Junior Member
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 have to map inherits 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 on 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
Re: binding attributes from inherited interfaces [message #1023233 is a reply to message #775305] Sat, 23 March 2013 13:46 Go to previous message
Barry Zhong is currently offline Barry Zhong
Messages: 7
Registered: March 2013
Junior Member
I found the defect was fixed in release 2.4.1, and I hope it's helpful.
Previous Topic:@XmlInverseReference back pointer not set on unmarshalling
Next Topic:Scrollable ResultSet Exception "End of Stream"
Goto Forum:
  


Current Time: Wed Jun 19 16:49:42 EDT 2013

Powered by FUDForum. Page generated in 0.01401 seconds