This content has been marked as final.
Show 1 reply
-
1. Re: How correctly produce json by RESTFUL web service on Fuse ESB?
samlewis Jan 2, 2013 1:24 PM (in response to nehal_sadek)I am very new to JAXRS with CXF (but have used Jersey a lot)
According to http://cxf.apache.org/docs/jax-rs-data-bindings.html#JAX-RSDataBindings-Jettison "Default JSON provider relies on Jettison 1.3 and it expects the types it deals with to follow the same techniques as described above in the JAXB support section for them to be handled properly."
I think, at a bare minimum you need the @XmlRootElement on your User object.
If you don't fancy JAXB annotations, you could check out the JacksonJsonProvider: http://cxf.apache.org/docs/jax-rs-data-bindings.html#JAX-RSDataBindings-Jackson