We have a Spring XML-config powered application that includes a CXF powered
JAX-WS service.

The trouble is, the service currently intercepts RuntimeExceptions and
throws them as SoapFaultException with the message passed through. This may
be the spec, but it's certainly not helpful to us.

So I'd like to change this behaviour thus:

1. I want to log the fault on the server
2. I want SoapFaultException messages to read more along the lines of
"Temporary fault. Please try again later."

I really don't want us airing dirty laundry like database connection faults
or SQL faults in public. Unfortunately, catching Exception inside our
service methods does not work.

So reading around CXF has interceptors. What I don't see is how to use this
to override the default behaviour. Is there a tutorial that I'm missing?

I'm having trouble imagining this default behaviour is desired by many
companies so I'm slightly surprised this isn't a hot topic...

TIA

JAmes

Reply via email to