Hi

There's a numer of options, the simplest ones are :
1. Return JAXRS Response from your method, with your error description (jaxb) 
bean set as a Response entity
2. Register a custom ExceptionMapper and convert a catched Exception instance 
into Response, same as in 1

cheers, Sergey

----- Original Message ----- From: "suraj chhetry" <[email protected]>
To: <[email protected]>
Sent: Wednesday, November 11, 2009 3:26 PM
Subject: Error handling


Hi,
I am using CXF in my project where i need to create both SOAP and RESTfull
web service.If there is exception on WS API it is throwing runtime error
with message.This is okay with SOAP but it is not good with REST. I want to
display error as

<Error>
 User Not found
</Error>
How can i achieve that goal? Please suggest me . Thank you for reading this
issue.



--
Best Regards
Suraj Chhetry
Home: +977-01-4387155
Mobile: +977-985110-2208

Reply via email to