This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Web Services Certification (SCDJWS/OCEJWSD) and the fly likes How to throw custom exceptions while implementing Provider Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Web Services Certification (SCDJWS/OCEJWSD)
Bookmark "How to throw custom exceptions while implementing Provider" Watch "How to throw custom exceptions while implementing Provider" New topic
Author

How to throw custom exceptions while implementing Provider

Kumar Raja
Ranch Hand

Joined: Mar 18, 2010
Posts: 518
    
    2

Hi All,

As we all know, invoke() method of provider throws WebServiceException, should some thing goes wrong. This exception is a runtime exception. But how do we handle a CustomException while implementing Provider interface. Especially when the wsdl has an exception declared as fault and following Contract first approach, how do we throw this custom exception "as is" in provider implementation. Wrapping custom exception in runtime exception is the only way we can propogate it back to client. Could you please explain me on this aspect ?


Regards
KumarRaja

Kumar Raja
Ranch Hand

Joined: Mar 18, 2010
Posts: 518
    
    2

Any advice.
 
Don't get me started about those stupid light bulbs.
 
subject: How to throw custom exceptions while implementing Provider
 
Similar Threads
Exception handling: throw custom exception while using apis
Exceptions In JavaScript
What is the meaning of this Enthuware's answer
custom runtime exception creation
Exception Handling Best Practices