Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » binding attributes from inherited interfaces(problem with usage of tag java-type -> xml-transient on interfaces)
binding attributes from inherited interfaces [message #775300] Thu, 05 January 2012 18:38
Manuel Glaser is currently offline Manuel GlaserFriend
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 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

Previous Topic:java.lang.LinkageError: loader (instance of sun/misc/Launcher$AppClassLoader): attempted duplicate
Next Topic:Cannot find Maven Repository
Goto Forum:
  


Current Time: Fri Mar 29 09:07:34 GMT 2024

Powered by FUDForum. Page generated in 0.03099 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top