Hi
On 14/06/13 08:58, Julio Carlos Barrera Juez wrote:
I want to serialize my REST Requests and Responses in JSON. I want to use
FasterXML Jackson [1] to perform this task. I'm using DOSGi 2.7.4 and
Jackson 2.2.3-SNAPSHOT. My model objects are JAXB annotated and my REST WS
is declared like this:
...
@Path("/foo")
@GET
@Consumes({ MediaType.APPLICATION_JSON })
@Produces({ MediaType.APPLICATION_JSON })
public ModelObjectB foo(ModelObjectA ModelObjectA);
...
I register it as an OSGi service using DOSGi
property "org.apache.cxf.rs.provider" with value
"com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider".
But when I call the WS, I get:
"No message body reader has been found for request class ModelObjectA,
ContentType : application/json."
What am I missing?
I think it is that Jackson 2.2.x related issue that I believe has been
fixed. Try CXF 2.7.6-SNAPSHOT please.
Moreover, it is possible to configure JacksonJaxbJsonProvider, or do I need
to extend the class with a custom configured class?
Have a look at the example at the of this post:
http://cxf.547215.n5.nabble.com/JaxRs-Yet-another-Unmarshall-Marshall-issue-with-CXF-2-7-2-tt5729213.html#a5729235
Sergey
Thank you!
[1] FasterXML Jackson - http://wiki.fasterxml.com/JacksonHome
--
Sergey Beryozkin
Talend Community Coders
http://coders.talend.com/
Blog: http://sberyozkin.blogspot.com