Hi Guys,

We're trying to implementing  the fastInfoset feature of CXF (2.2.5) in our
REST service, but it's returning a 500 internal server error ( No message
body writer has been found for response class Person ).

 wget:

wget -S --header="Accept: application/fastinfoset"
http://localhost:8080/services/samples/getSample?id=9

No message body writer has been found for response class Person


Our rest service is:

@Path("/samples")
@Features(features = { "org.apache.cxf.feature.FastInfosetFeature" })
@Produces({"application/xml","application/fastinfoset", "text/plain"})
public class SampleServiceImpl implements SampleService {

    @GET
    @Path("/getPerson")
    public Response getPerson() {
        Person person = new Person();
        person.setAge("99");
        person.setName("Homer Simpson");
        // trying the Response.ok()
        return Response.ok(person).build();
       // return person;
    }



Our class person is properly annotated with:

@XmlRootElement(name = "Person")
public class Person { .. }



Our project is maven base.

Any help will be greatly appreciated!

Thank you very much!

regards,
Allan

-- 
View this message in context: 
http://old.nabble.com/CXF-2.2.5-and-Fastinfoset-tp27062753p27062753.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to