Question

I have the following rest service (using apache wink)

@Consumes({MediaType.APPLICATION_JSON,MediaType.APPLICATION_XML})
@Produces({MediaType.APPLICATION_JSON,MediaType.APPLICATION_XML})
Response checkRecord(Element entity,
                     @QueryParam(ResourcesConsts.ALL_RULES) String checkAllRulesParam);

and I am able to get the responses in JSON without any problem. However, when I am trying to POST a json to it- It is unable to marshall it.

XMLs work well. I am using Apache wink and JAXB objects.

Any idea what can cause it?

Was it helpful?

Solution

Eventually I solved it by changing to jackson json provider as explained here: http://www.ibm.com/developerworks/library/wa-aj-jackson/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top