well, interestingly enough, my checked exception gets through intact, even if it's not declared on the method (this is being thrown by the interceptor).
I would really to deal with a runtime exception - could I convert the checked one to a runtime one is a client in-interceptor? Any ideas how to do that, and which phase would that be in? On Wed, Aug 13, 2014 at 4:31 PM, Daniel Kulp <[email protected]> wrote: > > On Aug 13, 2014, at 4:02 PM, New Groovy <[email protected]> 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 <[email protected]> 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 <[email protected]> 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 > >> [email protected] - http://dankulp.com/blog > >> Talend Community Coder - http://coders.talend.com > >> > >> > > -- > Daniel Kulp > [email protected] - http://dankulp.com/blog > Talend Community Coder - http://coders.talend.com > >
