intercepting exception before SOAPFaultMessage is created

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

intercepting exception before SOAPFaultMessage is created

Kristian Marinkovic
Hi all,

i'm using jaxws-rt 2.2.8 and spring 4 to publish an endpoint which delegates to other spring beans. If an exception is thrown the default SOAP fault message is created before i can get hold of it to apply my spring-based exception translation.

Is there a way to intercept the default SOAP exception handling? All i need is access to the thrown exception instance that is not part of the wsdl contract, not just the dump. Does anybody know how that can be done? If its not possible, is it a valid feature request?

I was able to track down the "culprit" to TieHandler.createResponse() line 284 where the fault message is being created:
responseMessage = SOAPFaultBuilder.createSOAPFaultMessage(soapVersion, null, cause);

But there is no way to change or intercept (AOP aside) the SOAPFaultBuilder. Going back the call stacktrace i only see the DataBindingImpl and the SEIInvokerTube instances before the WSServiceDelegate.

thanks in advance