cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "KARR, DAVID (ATTSI)" <dk0...@att.com>
Subject RE: How to have an interceptor execute on an exception in an earlier interceptor?
Date Fri, 12 Nov 2010 18:33:21 GMT
> -----Original Message-----
> From: Sven Zethelius [mailto:svenz@expedia.com]
> Sent: Friday, November 12, 2010 10:10 AM
> To: users@cxf.apache.org
> Subject: RE: How to have an interceptor execute on an exception in an
> earlier interceptor?
> 
> If you put an interceptor earlier in the same chain (e.g. Phase.SETUP
> in the OUT chain), and override its handleFault with the logic you
> want, it will get called during the unwinding of the phase interceptor
> chain.

Ok, that will handle the Soap fault case, but what if the initial
connection failed with an IOException, perhaps because of a timeout?
Will it get to the "handleFault()" method?

> -----Original Message-----
> From: KARR, DAVID (ATTSI) [mailto:dk068x@att.com]
> Sent: Thursday, November 11, 2010 7:24 PM
> To: users@cxf.apache.org
> Subject: How to have an interceptor execute on an exception in an
> earlier interceptor?
> 
> I'm working on replacing a custom soap client.  One thing the old code
> did was wrap the eventual sending of the message in a "try/finally"
> block so that it could do work in the try block that was guaranteed to
> match with code in the finally block.  The two matching blocks are
very
> simple, just making a single function call.  With CXF, the closest
> analogue is a matching "Out" and "In" interceptor.  However, I'm
> finding
> that if certain bad things happen, like a connection timeout, it
> appears
> that the "In" interceptor in the "RECEIVE" phase is never executed.
Is
> there some way I can do something analogous to the old code?

Mime
View raw message