This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach 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 Murach's Java Servlets and JSP this week in the Servlets 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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
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