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 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 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:EclipseLink-Moxy Unable to load custom DomHandler in OSGI environment
Next Topic:ddl-generation: create-or-extend-tables
Goto Forum:

Current Time: Wed Sep 28 14:10:46 GMT 2022

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

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

Back to the top