Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Using XmlJavaTypeAdapter(s) to map a third party class(Third party source code is inaccessible)
Using XmlJavaTypeAdapter(s) to map a third party class [message #1793712] Tue, 14 August 2018 12:51
Sebastian Frehmel is currently offline Sebastian FrehmelFriend
Messages: 1
Registered: August 2018
Junior Member
We have a third party library which consists entirely of POJOs and interfaces. We cannot modify the source code. Those POJOs can be deeply nested within themselves and cross-referencing each other.
We are trying to generate XML from a class structure that starts in our own code and then uses that third party lib's classes. We wish to generate XML all the way down to the leaves of the structural chain.

Some POJOs can be used as-is, but some - and the interfaces - will require using XmlJavaTypeAdapter(s) to transform them into XML.

So far we have been looking at JAXB that comes with Java 8. It is possible to create the package of one of those POJOs in our project and add the @XmlJavaTypeAdapters annotation to the package-info.java in there. This works locally in tests. However, due to a highly complex general setup of different class loaders, Maven etc, we can't use this approach in production.

So I came to MOXy.
My direct question is:
Can I use the externalized XML bindings file (specified through http://www.eclipse.org/eclipselink/xsds/eclipselink_oxm_2_4.xsd) to add XmlJavaTypeAdapter(s) without using annotations in the Java code? In a way that it works for third party classes?

Thank you!
Previous Topic:Performance control for dinamic weaving
Next Topic:EclipseLink-Moxy Unable to load custom DomHandler in OSGI environment
Goto Forum:
  


Current Time: Fri Sep 21 00:37:35 GMT 2018

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

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

Back to the top