Hi,

I'm using cxf 2.7.0. And this used to work in 2.6.1.

I tried to send a json object via HTTP PUT using HttpClient. I set the content type from the client with ContentType.APPLICATION_JSON. But I'm getting HTTP 415 from tomcat with: WARNING: No message body reader has been found for request class SystemConfig, ContentType : application/json;charset=UTF-8
WARNING: javax.ws.rs.WebApplicationException
at org.apache.cxf.jaxrs.utils.JAXRSUtils.readFromMessageBody(JAXRSUtils.java:1109)

 Here is the object:
@XmlRootElement(name="system_config")
public class SystemConfig extends Packable {
    private String managementIp;
}

And here is the service:
    @PUT
    @Path("/oob/config/set")
    @Consumes(MediaType.APPLICATION_JSON)
    public void setSystemConfig(SystemConfig config) {
        logger.debug("setting system config:" + config);
        // more code
    }

Any reason why cxf cannot find application/json message body reader? In cxf 2.6.1 I did not have to configure any json reader or provider to make this work.

Thanks for any help.

Joe


Reply via email to