cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cganesan <>
Subject No message body reader has been found for request class
Date Tue, 31 Jan 2012 23:10:03 GMT

I'm trying to exectute an Http POST with following JSON in the request body:

   "id":  "9852654659650"

I expect the JSON to be mapped to the folllowing requestBean Java object to
be injected before the service method is called:

My service method is as follows:

    public String test(RequestBean requestBean) {
        return "test";

I get the error:
No message body reader has been found for request class RequestBean.

The problem is with maping the inputstream to java object.
I'm using spring configuation as follows. Do I need to configure
MessageBodyProvider? If so, could you provide some sample?

    <import resource="classpath:META-INF/cxf/cxf.xml" />
    <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />

    <jaxrs:server id="myService" address="/myService">
            <ref bean="serviceImpl" />

    <bean id="serviceImpl" class="services.ServiceImpl" />

Appreciate the help


View this message in context:
Sent from the cxf-user mailing list archive at

View raw message