I am using CXF 3.1.7 based CXFNonSpringJaxrsServlet with custom provider
extended from JacksonJsonProvider.
I have a POJO ServiceResponse<T> class object returned from one of the
service apis. This class legacy and uses JAXB annotations. The resultant
JSON on client side is like following:
Object of ServiceResponse<String>
JSON:
{"ServiceResponse":{"status":"OK","payload":{"@xsi.type":"xs:string","$":"
testing !!"}}}
I could not get this JSON to deserialized POJO using fasterxml ObjectMapper,
the payload is null.
ServiceResponse<String> srResponse = objectMapper.readValue(result, new
TypeReference<ServiceResponse<String>>() {});
I use the JacksonJsonProvider as 'jaxrs.providers' in web.xml. Also us it
on WebClient as provider.
This used to work fine with CXF 2.7.15. Is there a way to avoid the
"@xsi.type" from getting into JSON or making JacksonJsonProvider to not fail
and deserialize properly?
--
View this message in context:
http://cxf.547215.n5.nabble.com/CXF-3-1-7-with-CXFNonSpringJaxrsServlet-and-custom-provider-deserialization-issue-tp5771651.html
Sent from the cxf-user mailing list archive at Nabble.com.