Hi Akash

CXF does mantains message resources but for its own internal use to make sure 
error messages can be properly localized,

Can you explain how would you like CXF JAXRS to help, as far as ensuring that WebApplicationExceptions which are thrown contain the correct error codes and user-defined messages ?

WebApplicationException can accept a Response which can be built at a time when a new exception is being thrown. Response can take status codes and entities and headers. So if it's a user code which throws the exception then some external resource can be checked to retrieve a message and thus an approriate Response can be built and supplied to a WebApplicationException instance.

Or do you have something else in mind ?

Cheers, Sergey



Hi,

For my application (using RESTful web services) we have a requirement for
error cases to respond to user with proper error codes & user friendly
messages. CXF user guide mentiones a small section for Exception handling by
either throwing WebApplicationException or returning Response object with a
proper error code set.

However i was wondering if CXF maintains messageResources or properties file
for reading error codes and error messages something similar to spring
framework way. If there is any example or sample to show the usage for this
then please point me to the link.

thanks,
Akash
--
View this message in context: 
http://www.nabble.com/Error-Codes---Error-Message-handling-using-CXF-tp20649919p20649919.html
Sent from the cxf-user mailing list archive at Nabble.com.




Reply via email to