Thanks Dan.
I ended up adding it at the end of the PRE_PROTOCOL phase, which is where I
check what object is in the cause and following Amazon model update the
Fault error code with one of the pre-defined error codes.
If IllegalArgument etc. leak out I can deal with it there. or if I need to
traslate from platform level to WS layer error code, I can also control it
there in one place. May be I could do it in front of the phase, probably
could optimize it that way later.


vickatvuuch wrote:
> 
> Dan,
> I was thinking of making a custom WebFaultOutInterceptor and inserting it
> before the default one in the PRE_PROTOCOL phase.
> Could you tell me how to remove the default WebFaultOutInterceptor from
> the chain?
> 
> Thanks,
> -Vitaly
>  
> 
> dkulp wrote:
>> 
>> 
>> One way of achieving this is to stick an interceptor very early in the 
>> FaultOut chain that would get the chain from the message and manipulate
>> the 
>> chain.   Adding your own interceptors if needed, removing those you don't 
>> want, etc...   The chains are completely modifiable at run time during 
>> execution.
>> 
>> Dan
>> 
>> 
>> On Wed November 18 2009 11:37:28 am vickatvuuch wrote:
>>> Hi !
>>> I'm trying to figure out how to pickup all exceptions (including
>>> IllegalArgument, NPE, etc)
>>> that may be thrown from custom IN interceptors as well as Port Impls
>>> such
>>> that I would be able to wrap it up in MyWebFault which has defined
>>> ERROR_CODEs exposed through WSDL.
>>> I see that there are several OUT interceptors processing exceptions, my
>>> question is how to replace
>>> default one with my custom version of it or should I insert mine in
>>> front
>>>  of them and pre-process the message instead? The approach should also
>>> work
>>>  with REST and hopefully be in once place.
>>> 
>>> Thanks,
>>> -Vitaly
>>> 
>> 
>> -- 
>> Daniel Kulp
>> dk...@apache.org
>> http://www.dankulp.com/blog
>> 
>> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Soap-Fault-handling-in-the-Out-Interceptor-tp26408430p26418879.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to