Hi,

I've created a cxfrs route as described in
http://camel.apache.org/cxfrs.html (How to consume the REST request in
Camel). I am using SOAPUI to test the endpoint. The resource class is:

/@Path("/")
@Consumes({"application/xml","application/json"})
@Produces({"application/xml","application/json"})
public class Resource {
 
        @POST
        @Path("/doit/")
        @Consumes({"application/xml","application/json"})
        @Produces({"application/xml","application/json"})
    public DoItResponse doit(DoItRequest request){return null;};
}/

For XML everything works fine, but when I send a json request I always get:

<data contentType="text/plain" contentLength="555"><![CDATA[JAXBException
occurred : unexpected element (uri:"", local:"DoItRequest"). Expected
elements are
<{http://www.xyz.org/types}DoItRequest>,<{http://www.xyz.org/types}DoItResponse>,<{http://www.xyz.org/types}
ProviderError>. unexpected element (uri:"", local:"DoItRequest") ...

I set media type and access header to application/json, but it seems that
json is not recognized.
Any ideas?






--
View this message in context: 
http://camel.465427.n5.nabble.com/CXFRS-does-not-process-JSON-tp5716343.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to