I'm hardly an expert in this regard, but this was my effort at least
with SOAP faults:
http://www.jroller.com/gmazza/entry/updating_database_tables_using_jaxws
Glen
On 11/03/2011 11:24 AM, [email protected] wrote:
Hi,
I'm using the CXF for developing webservices.
But I was wondering what is Best Practice for handling exceptions? Let's say
I have a webservice-operation, create(User user).
The incoming user is an instance of my User domain class, and can be saved
directly by the UI Team by calling user.save()
If the save() for some reason fail (e.g. some Network connectivity fail ,
or some data validation error from User DTO ), how would Best Practice
dictate that I serve this exception to the client?
I mean: Which type of Exception would be suitable?
Should this Exception be included in the operations signature ??
public Response createUser(User user);
@WebService
public interface EmpService {
public Response createUser(User user);
}
And how should the client-side handle this exception?
--
View this message in context:
http://cxf.547215.n5.nabble.com/Handling-Exceptions-in-Apache-CXF-tp4961369p4961369.html
Sent from the cxf-user mailing list archive at Nabble.com.
--
Glen Mazza
Talend - http://www.talend.com/apache
Blog - http://www.jroller.com/gmazza/
Twitter - glenmazza