Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Handle Exceptions (oc4j)

 
James Clinton
Ranch Hand
Posts: 190
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic