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.

- http://blog.bdoughan.com/2012/03/moxy-as-your-jax-rs-json-provider.html

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


Current Time: Thu Nov 27 03:08:26 GMT 2014

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

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