This should work, we have a system test located under 
http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerBookTest.java?view=markup&pathrev=606708,
 see the testUpdateBookWithJSON method. Make sure you set your request content 
type to "application/json". Let me know if this does not help.

Cheers,
Jervis

> -----Original Message-----
> From: ákos Maróy [mailto:[EMAIL PROTECTED]
> Sent: 2008年1月7日 21:38
> To: [email protected]
> Subject: JSON serialization not working for PUT requests
> 
> I'm trying to create a JAX-RS web service using CXF, and it seems that
> JSON serialization would only work one way.
> 
> if I specify the following:
> 
> 
> @HttpMethod("PUT")
> @UriTemplate("/foo")
> @ConsumeMime("application/json")
> 
> 
> I still get an XML SAX exception, which sort of implies, that CXF tries
> to de-marshal the contens as if it was XML..
> 
> am I doing something wrong?
> 
> 
> Akos

----------------------------
IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland

Reply via email to