Sorry, please ignore.

CXF does properly serialize the response as JSON, including error
responses.  It was just my test code that was wrong.  The positive test
case was configured with Accepts="application/json", but the negative
test case wasn't updated and had Accepts="application/xml".  Coding for
too long can do wonders to your eyes:)


-----Original Message-----
From: Vinh Nguyen (vinguye2) 
Sent: Friday, July 10, 2009 4:18 PM
To: [email protected]
Subject: json error response

Hi,
 
I have a service that returns a custom data object.  It returns JSON
fine.  To handle errors, it throws a WebApplicationException whose
response body detail is from a JAXB object.  But the error response is
coming as XML.  What configuration is needed to get the error response
as JSON?
 
Thanks,
-Vinh
 

Reply via email to