Skip to Content
0
Oct 31, 2012 at 10:16 AM

How to disable auto-wrapping of RuntimeExceptions using Webservices?

43 Views

Hi,

Here is our problem: There is an Webervice Endpoint definition which can not be changed. This endpoint doesn't define any return value nor Exception.

public void save(String saveToken, byte[] wordDocument);

Due to business logic we have to throw an exception anyhow. Because of the design failure we have to throw an RuntimeException. When thrown, RuntimeExceptions are wrapped into EJBExceptions resulting in an SOAPFaultException. That's ok, but the problem is the message of SOAPFaultExceptions which includes a whole bunch of stacktrace infromations and at the end our custom message. This message is unreadable for end-users.

So, is there any way to customize this default behaviour (such as exclude a certain list of exceptions)?

Thanks a lot