Frage

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?

War es hilfreich?

Lösung

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

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top