On Wednesday 09 April 2008, Florian Rosenberg wrote:
> hi glen,
>
> Glen Mazza wrote:
> > Server faults go into separate interceptor chains (second paragraph
> > of [1])--I have not done this before, but you should be able to
> > reuse the interceptors you have on your normal non-error chains for
> > the error situations.
>
> so you mean the FAULT chain? i've added my interceptor everywhere but
> AFAIR the fault chain interceptors are not invoked and all
> interceptors in the IN chain stop after the READ phase (in case of the
> server fault)

This is slightly changing in 2.0.6/2.1 as it may go a little bit furthur 
into the IN chain, but it won't go all the way.   Basically, when a 
message comes in, it starts out on the IN chain.   At some point along 
the chain (always was in the ReadHeadersInterceptor in 2.0.5, but will 
be furthur along in 2.0.6/2.1 in order to get ws-security to fully 
digest the whole body), it checks if the soap:body child is a 
soap:fault.  If so, it stops the In chain and re-dispatches on the IN 
FAULT chain.   Keep in mind, there are two fault chains.   There is an 
OUT fault chain on the server and an IN fault chain on the client.  Make 
sure you add to the right chain.

Dan



>
> -Florian
>
> > [1] http://cwiki.apache.org/CXF20DOC/interceptors.html
> >
> > Am Mittwoch, den 09.04.2008, 11:14 +0200 schrieb Florian Rosenberg:
> >> hi all,
> >>
> >> I'm writing a automated system for monitoring certain quality of
> >> service properties (e.g., response time, etc) from a client-side
> >> perspective. this works quite well as long as no fault occur on the
> >> service provider that i'm trying to invoke. I use a couple of
> >> interceptors in the IN and OUT chains to achieve it.
> >>
> >> in case of a fault that occurs on the server, I need to be aware of
> >> this fault at the client side (e.g., I need to log the fault
> >> message etc into a database).
> >>
> >> the problem I'm struggling with it the following: if a fault occurs
> >> on the server my incoming interceptor chain at the client side is
> >> not processed to the latest phase where I have my interceptor that
> >> stores all the stuff into the database. the interceptor chain stops
> >> after the READ phase on my client (thats what I could see in the
> >> debugger).
> >>
> >> I've experimented a bit with a simple interceptor that just dumps a
> >> message to the console upon calling handleMessage() and
> >> handleFault(). I've added to every phase in the IN and FAULT chain,
> >> nevertheless handleFault() is never called upon receiving a fault
> >> message from the server.
> >>
> >> could someone please clarify how faults from the server can be
> >> handled in the client-side interceptor chains (i'm using cxf
> >> v2.05)?
> >>
> >> thanks,
> >> -Florian



-- 
J. Daniel Kulp
Principal Engineer, IONA
[EMAIL PROTECTED]
http://www.dankulp.com/blog

Reply via email to