cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrei Shakirin <ashaki...@talend.com>
Subject RE: Fault chains in cxf clients
Date Fri, 29 Jul 2016 15:57:28 GMT
Hi Jason,

You could find pretty nice description here: https://access.redhat.com/documentation/en-US/Fuse_ESB_Enterprise/7.0/html-single/Developing_Apache_CXF_Interceptors/index.html

The fault chain on client side is working in following way:
a) outgoing
    if exception happens in client outgoing interceptor, outbound chain is unwound (by calling
onFault() method in outgoing interceptors) and control is returned to the application level
code. The fault chain is not really required in this case, because client will receive programmatic
exception

b) incoming
    If the response is an error message, it is passed into the client fault processing interceptor
chain. Here fault chain is really necessary.
    If any of the interceptors on the inbound chain create an error condition, the chain is
unwound and control is redirected to application code

Server side:
a) incoming
If any of the interceptors on the inbound chain create an error condition, the chain is unwound
and a fault is dispatched to the consumer.
An interceptor chain is unwound by calling the fault processing method on all of the previously
invoked interceptors.

b) outgoing
If the response is an exception, it is passed through the fault processing interceptor chain.
If any of the interceptors on the outbound chain create an error condition, the chain is unwound
and a fault message is dispatched.

Hope this helps.

Regards,
Andrei.



> -----Original Message-----
> From: jasonmpell@gmail.com [mailto:jasonmpell@gmail.com] On Behalf Of
> Jason Pell
> Sent: Mittwoch, 27. Juli 2016 07:22
> To: users@cxf.apache.org
> Subject: Fault chains in cxf clients
> 
> Hi,
> 
> I am trying to get some more insight into when the outgoing and incoming fault
> interceptor chains are activated.  I had thought that the fault chains are
> automatically executed if a Fault is thrown from an interceptor.  But it appears
> as though this is not correct, at least for clients.  I think it works like that server
> side.
> 
> I noticed that the XMLMessageInInterceptor manually activates the incoming
> fault chain in the xml in the message is a XMLFault
> 
> Is it a bug that throwing a fault from a interceptor in the outgoing and
> incoming chains does not automatically activate the related fault chain?
> 
> I am using cxf 3.1.6
Mime
View raw message