Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Use Spring's MarshallingHttpMessageConverter and MOXy without @XmlRootElement
Use Spring's MarshallingHttpMessageConverter and MOXy without @XmlRootElement [message #899336] Tue, 31 July 2012 13:43 Go to next message
Ben Grommes is currently offline Ben GrommesFriend
Messages: 1
Registered: July 2012
Junior Member
I trying to exclusively use the MOXy mapping file instead of annotations to define my object to xml mapping. The only roadblock I have encountered is the need for the @XmlRootElement annotation due to the use of Spring's MarshallingHttpMessageConverter and Jaxb2Marshaller which require an @XmlRootElement annotation (Specifically the Jaxb2Marshaller.supportsInternal method).

Any suggestions for dealing with this (I don't want to use JAXBElements)? Would you agree that Spring should change Jaxb2Marshaller to allow usage in a mode where @XmlRootElement is not present.
Re: Use Spring's MarshallingHttpMessageConverter and MOXy without @XmlRootElement [message #899592 is a reply to message #899336] Wed, 01 August 2012 14:25 Go to previous message
Blaise Doughan is currently offline Blaise DoughanFriend
Messages: 163
Registered: July 2009
Senior Member

Hi Ben,

I'm not familiar with MarshallingHttpMessageConverter, but looking at the Javadoc it appears to closely resemble MessageBodyReader/MessageBodyWriter in JAX-RS. Does this mechanism for you to write your own converter extension where you could implement your own supports method?

Here is a link to a sample MessageBodyReader/MessageBodyWriter that I wrote to enable MOXy as a JAX-RS JSON-binding provider that you could use as a guide.


Previous Topic:Problem with criteria
Next Topic:Eclipselink JPA named query not ignoring white spaces.
Goto Forum:

Current Time: Fri Jun 22 23:08:51 GMT 2018

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

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

Back to the top