Quantcast
Channel: Apache Timeline
Viewing all articles
Browse latest Browse all 5648

POJO to be returned with Content-Type: text/plain

$
0
0
Hi All,

I am trying to return a POJO object with Content-Type: text/plain. I am
getting below exception when calling my service:

No message body writer has been found for response class PojoClassName.

I was able to return this pojo in JSON format by setting Accept:
application/json in request header, since I have Provider configured for
JSON in my cxf-servlet.xml(org.codehaus.jackson.jaxrs.JacksonJsonProvider).

Is there a need of similar provider to be configured for text/plain content
type? Or is there any work around for it!!

Thanks, Puneet.

Viewing all articles
Browse latest Browse all 5648

Trending Articles