You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by David Karlsen <da...@gmail.com> on 2011/11/17 14:50:57 UTC

Grabbing in- or out-going Faults

Hi.

I want to be able to detect all incoming or outgoing Faults.
I've tried to create an SoapInterceptor and implement
public void handleFault( SoapMessage message )

which has been registered as an inFaultInterceptor in phase Phase.USER_PROTOCOL
and outFaultInterceptor in phase Phase.SEND after the Soap11FaultOutInterceptor

but no-go.

Any pointers?

Is it possible to subscribe to Fault events directly from CXF - or do
I have to get my approach above working?

--
David J. M. Karlsen - http://www.linkedin.com/in/davidkarlsen

Re: Grabbing in- or out-going Faults

Posted by David Karlsen <da...@gmail.com>.
Anybody?

2011/11/17 David Karlsen <da...@gmail.com>:
> Hi.
>
> I want to be able to detect all incoming or outgoing Faults.
> I've tried to create an SoapInterceptor and implement
> public void handleFault( SoapMessage message )
>
> which has been registered as an inFaultInterceptor in phase Phase.USER_PROTOCOL
> and outFaultInterceptor in phase Phase.SEND after the Soap11FaultOutInterceptor
>
> but no-go.
>
> Any pointers?
>
> Is it possible to subscribe to Fault events directly from CXF - or do
> I have to get my approach above working?
>
> --
> David J. M. Karlsen - http://www.linkedin.com/in/davidkarlsen
>



-- 
--
David J. M. Karlsen - http://www.linkedin.com/in/davidkarlsen

Re: Grabbing in- or out-going Faults

Posted by Daniel Kulp <dk...@apache.org>.
On Tuesday, November 22, 2011 11:30:33 AM David Karlsen wrote:
> OK - it works as in I do get the method called by cxf.
> However, there is no Fault available from:
> 
> Fault fault = soapMessage.getContent( Fault.class );
> at this point (null is returned).

It may be getContent(Exception.class) instead.  I believe that's how it's 
stored.

Dan


> 2011/11/21 Daniel Kulp <dk...@apache.org>:
> > On Saturday, November 19, 2011 6:09:16 PM David Karlsen wrote:
> >> Thanks - I'll try that.
> >> What phase should I register with to be able to catch all incoming and
> >> all outgoing faults?
> > 
> > I would try in the USER_LOGICAL for both and see if that would work.
> > 
> > Dan
> > 
> >> 2011/11/18 Daniel Kulp <dk...@apache.org>:
> >> > On Thursday, November 17, 2011 2:50:57 PM David Karlsen wrote:
> >> >> Hi.
> >> >> 
> >> >> I want to be able to detect all incoming or outgoing Faults.
> >> >> I've tried to create an SoapInterceptor and implement
> >> >> public void handleFault( SoapMessage message )
> >> >> 
> >> >> which has been registered as an inFaultInterceptor in phase
> >> >> Phase.USER_PROTOCOL and outFaultInterceptor in phase Phase.SEND
> >> >> after
> >> >> the Soap11FaultOutInterceptor
> >> >> 
> >> >> but no-go.
> >> >> 
> >> >> Any pointers?
> >> > 
> >> > If you are on the fault chain already, it's likely just using the
> >> > handleMessage(...) call.   The handleFault is only called when
> >> > unwinding the current chain when an exception occurred on that
> >> > chain.
> >> > 
> >> > Dan
> >> > 
> >> >> Is it possible to subscribe to Fault events directly from CXF -
> >> >> or do
> >> >> I have to get my approach above working?
> >> >> 
> >> >> --
> >> >> David J. M. Karlsen - http://www.linkedin.com/in/davidkarlsen
> >> > 
> >> > --
> >> > Daniel Kulp
> >> > dkulp@apache.org - http://dankulp.com/blog
> >> > Talend Community Coder - http://coders.talend.com
> > 
> > --
> > Daniel Kulp
> > dkulp@apache.org - http://dankulp.com/blog
> > Talend Community Coder - http://coders.talend.com
-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com

Re: Grabbing in- or out-going Faults

Posted by David Karlsen <da...@gmail.com>.
OK - it works as in I do get the method called by cxf.
However, there is no Fault available from:

Fault fault = soapMessage.getContent( Fault.class );
at this point (null is returned).


2011/11/21 Daniel Kulp <dk...@apache.org>:
> On Saturday, November 19, 2011 6:09:16 PM David Karlsen wrote:
>> Thanks - I'll try that.
>> What phase should I register with to be able to catch all incoming and
>> all outgoing faults?
>
> I would try in the USER_LOGICAL for both and see if that would work.
>
> Dan
>
>
>>
>> 2011/11/18 Daniel Kulp <dk...@apache.org>:
>> > On Thursday, November 17, 2011 2:50:57 PM David Karlsen wrote:
>> >> Hi.
>> >>
>> >> I want to be able to detect all incoming or outgoing Faults.
>> >> I've tried to create an SoapInterceptor and implement
>> >> public void handleFault( SoapMessage message )
>> >>
>> >> which has been registered as an inFaultInterceptor in phase
>> >> Phase.USER_PROTOCOL and outFaultInterceptor in phase Phase.SEND after
>> >> the Soap11FaultOutInterceptor
>> >>
>> >> but no-go.
>> >>
>> >> Any pointers?
>> >
>> > If you are on the fault chain already, it's likely just using the
>> > handleMessage(...) call.   The handleFault is only called when unwinding
>> > the current chain when an exception occurred on that chain.
>> >
>> > Dan
>> >
>> >> Is it possible to subscribe to Fault events directly from CXF - or do
>> >> I have to get my approach above working?
>> >>
>> >> --
>> >> David J. M. Karlsen - http://www.linkedin.com/in/davidkarlsen
>> >
>> > --
>> > Daniel Kulp
>> > dkulp@apache.org - http://dankulp.com/blog
>> > Talend Community Coder - http://coders.talend.com
> --
> Daniel Kulp
> dkulp@apache.org - http://dankulp.com/blog
> Talend Community Coder - http://coders.talend.com
>



-- 
--
David J. M. Karlsen - http://www.linkedin.com/in/davidkarlsen

Re: Grabbing in- or out-going Faults

Posted by Daniel Kulp <dk...@apache.org>.
On Saturday, November 19, 2011 6:09:16 PM David Karlsen wrote:
> Thanks - I'll try that.
> What phase should I register with to be able to catch all incoming and
> all outgoing faults?

I would try in the USER_LOGICAL for both and see if that would work.  

Dan


> 
> 2011/11/18 Daniel Kulp <dk...@apache.org>:
> > On Thursday, November 17, 2011 2:50:57 PM David Karlsen wrote:
> >> Hi.
> >> 
> >> I want to be able to detect all incoming or outgoing Faults.
> >> I've tried to create an SoapInterceptor and implement
> >> public void handleFault( SoapMessage message )
> >> 
> >> which has been registered as an inFaultInterceptor in phase
> >> Phase.USER_PROTOCOL and outFaultInterceptor in phase Phase.SEND after
> >> the Soap11FaultOutInterceptor
> >> 
> >> but no-go.
> >> 
> >> Any pointers?
> > 
> > If you are on the fault chain already, it's likely just using the
> > handleMessage(...) call.   The handleFault is only called when unwinding
> > the current chain when an exception occurred on that chain.
> > 
> > Dan
> > 
> >> Is it possible to subscribe to Fault events directly from CXF - or do
> >> I have to get my approach above working?
> >> 
> >> --
> >> David J. M. Karlsen - http://www.linkedin.com/in/davidkarlsen
> > 
> > --
> > Daniel Kulp
> > dkulp@apache.org - http://dankulp.com/blog
> > Talend Community Coder - http://coders.talend.com
-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com

Re: Grabbing in- or out-going Faults

Posted by David Karlsen <da...@gmail.com>.
Thanks - I'll try that.
What phase should I register with to be able to catch all incoming and
all outgoing faults?

2011/11/18 Daniel Kulp <dk...@apache.org>:
> On Thursday, November 17, 2011 2:50:57 PM David Karlsen wrote:
>> Hi.
>>
>> I want to be able to detect all incoming or outgoing Faults.
>> I've tried to create an SoapInterceptor and implement
>> public void handleFault( SoapMessage message )
>>
>> which has been registered as an inFaultInterceptor in phase
>> Phase.USER_PROTOCOL and outFaultInterceptor in phase Phase.SEND after the
>> Soap11FaultOutInterceptor
>>
>> but no-go.
>>
>> Any pointers?
>
> If you are on the fault chain already, it's likely just using the
> handleMessage(...) call.   The handleFault is only called when unwinding the
> current chain when an exception occurred on that chain.
>
> Dan
>
>
>>
>> Is it possible to subscribe to Fault events directly from CXF - or do
>> I have to get my approach above working?
>>
>> --
>> David J. M. Karlsen - http://www.linkedin.com/in/davidkarlsen
> --
> Daniel Kulp
> dkulp@apache.org - http://dankulp.com/blog
> Talend Community Coder - http://coders.talend.com
>



-- 
--
David J. M. Karlsen - http://www.linkedin.com/in/davidkarlsen

Re: Grabbing in- or out-going Faults

Posted by Daniel Kulp <dk...@apache.org>.
On Thursday, November 17, 2011 2:50:57 PM David Karlsen wrote:
> Hi.
> 
> I want to be able to detect all incoming or outgoing Faults.
> I've tried to create an SoapInterceptor and implement
> public void handleFault( SoapMessage message )
> 
> which has been registered as an inFaultInterceptor in phase
> Phase.USER_PROTOCOL and outFaultInterceptor in phase Phase.SEND after the
> Soap11FaultOutInterceptor
> 
> but no-go.
> 
> Any pointers?

If you are on the fault chain already, it's likely just using the 
handleMessage(...) call.   The handleFault is only called when unwinding the 
current chain when an exception occurred on that chain.   

Dan


> 
> Is it possible to subscribe to Fault events directly from CXF - or do
> I have to get my approach above working?
> 
> --
> David J. M. Karlsen - http://www.linkedin.com/in/davidkarlsen
-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com