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 messageGo to next message
Barry Zhong is currently offline Barry Zhong
Messages: 11
Registered: March 2013
Junior Member
I found the defect was fixed in release 2.4.1, and I hope it's helpful.
Re: binding attributes from inherited interfaces [message #1142636 is a reply to message #1023233] Thu, 17 October 2013 15:20 Go to previous message
Rodrygo Santos is currently offline Rodrygo Santos
Messages: 1
Registered: October 2013
Junior Member
Hi folks,

I'm facing exactly the same problem reported by Manuel Glaser. However, contrary to what Barry Zhong suggests, if this is indeed a bug, it doesn't appear to have been fixed in release 2.4.1 (I'm testing on 2.5.1).

Any idea of how to work around this while sticking with interfaces purely?
Previous Topic:[Solved] Eclipselink + Karaf + Oracle JDBC
Next Topic:Full FetchGroup is NULL
Goto Forum:
  


Current Time: Mon Apr 21 03:07:02 EDT 2014

Powered by FUDForum. Page generated in 0.03054 seconds