On Aug 13, 2014, at 4:02 PM, New Groovy <newtogro...@gmail.com> wrote:

> Is it supposed to work with a RuntimeException, setting
> UNCHECKED_APPLICATION_FAULT?
> 
> If I do that, I see the SOAPFaultException…

If what you throw is not a fault that’s declared on the operation, you will 
always get s SOAPFaultException on the client side.   The information in the 
wsdl (and/or throws clauses of the operation) are the only things examined when 
mapping the fault from the soap message to an exception to be thrown.  If they 
don’t match, the more generic SOAPFaultException is thrown.

Dan


> On Wed, Aug 13, 2014 at 2:31 PM, Daniel Kulp <dk...@apache.org> wrote:
> 
>> 
>> You could likely just mimic what the AbstractInvoker does in your
>> interceptor.  Something like:
>> 
>> 
>> message.put(FaultMode.class, FaultMode.CHECKED_APPLICATION_FAULT);
>> throw new Fault(ex);
>> 
>> 
>> Dan
>> 
>> 
>> 
>> On Aug 13, 2014, at 2:04 PM, New Groovy <newtogro...@gmail.com> wrote:
>> 
>>> Hi,
>>> 
>>> If the code in our SOAP services throw an exception, we get an exception
>>> returned.
>>> 
>>> However, we have an In interceptor that runs in PRE_INVOKE, that needs to
>>> also return an exception.
>>> 
>>> However, throwing it from there results in a SOAPFaultException for the
>>> caller, and there doesn't seem to be a way to retrieve the underlying
>>> exception.
>>> 
>>> Is there a way to do this?
>>> 
>>> Thanks!
>> 
>> --
>> Daniel Kulp
>> dk...@apache.org - http://dankulp.com/blog
>> Talend Community Coder - http://coders.talend.com
>> 
>> 

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

Reply via email to