File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes Handle Exceptions (oc4j) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Handle Exceptions (oc4j)" Watch "Handle Exceptions (oc4j)" New topic
Author

Handle Exceptions (oc4j)

James Clinton
Ranch Hand

Joined: Jun 23, 2003
Posts: 190
I am a bit confused about the best why to handle exceptions (RPC style) and would like your help.

For example, if my w_service was returning an array of Value Objects to a client, but the w_service side threw an exception, should I try/catch the exception and simply return an empty list to the client? or is it best to generate a SOAP exception of some sort to let the client know a problem occurred.

Is this possible via JAX-RPC (stubs) or do I need to use a lower level api like SAAJ?

Is it reasonable to detail in the WSDL that in order to use a particular w_service successfully, a client should check a getErrorFlag return value and if false to handle there own processing accordingly?

I have made a search for this in the forum but without success.

Thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Handle Exceptions (oc4j)