Hiding java exceptions from clients. (JAX-WS/SOAP)

View: New views
1 Messages — Rating Filter:   Alert me  

Hiding java exceptions from clients. (JAX-WS/SOAP)

by uprooter :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi.
I asked this question in other forum but didn't get any response.
I have a simple web service using jax-ws 2.1 on top of tomcat-6.
When I have some kind of java exceptions (like database connection error, missing file, IO error) java throws an exception and pass it to the SOAP client.
I'd like to hide my internal errors from the SOAP client and provide other generic exception that would just say something like "internal error" and nothing more. (but still have that exception details in my log files).
I can wrap each web method I have with try/catch but I'm looking for a generic solution that would catch exceptions in all of the web methods I've got and also catch all kinds of exceptions.

Any idea?