Skip to main content



      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 09:43 Go to next message
Eclipse UserFriend
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 10:25 Go to previous message
Eclipse UserFriend
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: Wed Jul 23 05:13:27 EDT 2025

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

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

Back to the top