Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error and exception handling in Web Service

 
Raghuveer Rawat
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi rancher
Anyone who has handled exception and error in web service. Soap Spec says error and exception will be carried in fault element in which it has actor, action, details etc.
But I am in doubt when calling some web service method suppose method throws SQLException what happens in this case soap toolkit automatically generates corresponding fault code. or we have to some additional work for it.
How to process error at client side in case of error or exception.
 
Balaji Loganathan
author and deputy
Bartender
Posts: 3150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See this example from Apache axis.. its show how to throw an soap fault when there is no such employee reqeust.. you can try to use the same logic for your case.
 
Kuldeep Vaishnav
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Sorry about jumping on the wagon but I was looking at the example pointed out by Balaji and it seems Mr.Dims has tried to fix the "Bug 19682 - non-AxisFault exceptions don't have details serialized"...But the example fault(NoSuchEmployeeFault)does not contain detail section....can someone please point me to an example containing a user defined fault with details section? I had serious problems trying to implement(which ultimately I could not)a fault with detail section few weeks back.....
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic