@Consumes("application/json") was already there. Just to experiment I added
@Consumes({"application/xml", "application/json"}) and tried with equivalent
xml instead. With xml it worked. 
Input XML:
<Customers><Customer><id>2999</id><name>Som
Awasthi</name></Customer><Customer><id>3000</id><name>Arnav
Awasthi</name></Customer></Customers>

Output JSON:
{"Customer":[{"id":2999,"name":"Som Awasthi"},{"id":3000,"name":"Arnav
Awasthi"}]}

But if I try the opposite, it doesn't work. May be this error is due to the
JAXB library, which does not support this feature.--
View this message in context: 
http://cxf.547215.n5.nabble.com/How-to-submit-JSON-data-as-request-body-in-Apache-CXF-jax-rs-REST-tp4361669p4362777.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to