On Jun 25, 2014, at 12:44 PM, Frizz <frizzthe...@googlemail.com> wrote:

> I have a custom interceptor. In case the SoapMessage is an Exception, I'd
> like to skip all my other interceptors and return a SOAP Fault.

Where in the chain is your interceptor?   If it’s on the incoming chain, just 
throw a org.apache.cxf.interceptor.Fault (or 
org.apache.cxf.binding.soap.SOAPFault).   CXF would then run that through the 
fault chain which would write it out.   If it’s on the outgoing chain, you can 
TRY doing the same thing.   If nothing has been written out yet, that will 
work.   If something has been written, the behavior is kind of undefined.

Dan


> 
> public void handleMessage(SoapMessage message)
> ...
> if (message.getContent(Exception.class)!=null) {
>    skip other interceptors and return SOAP Fault
> }
> ...
> 
> Is this possible? Or do I have to put some logic in each and every one of
> my interceptors?

-- 
Daniel Kulp
dk...@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com

Reply via email to