It's important to send a fault to client and let the client know what went wrong. How ever I think wrapping everything inside an Exception will cause client to end up with all kind of additional errors(that's no interest to the client) that server might end up within that try/catch block (for example out of memory).
I think we should just trigger the registered fault handler(default fault handler in case of missing fault handler) and let users to define what to send/meditate in the SOAP fault before sending to the client. If no fault handler is found according to the default fault handler( log + drop) client will end up with a time out. Anyway this will make transport aware of the fault handler. Rajika On Mon, Jul 22, 2013 at 7:31 PM, Hiranya Jayathilaka <[email protected]>wrote: > Hi Folks, > > I'm looking into SYNAPSE-849 (Synapse doesn't handle malformed XML > messages properly). Issue has been reported for the old NHTTP transport, > but it's valid for the pass through transport as well. Currently Synapse > simply logs the error but doesn't send any response to the client, causing > the client to timeout. > > The reason is that the error thrown by Axiom in case of malformed XML is > an unchecked exception (DeferredParsingException). Synapse only looks for > and handles AxisFaults and other obvious checked exceptions like > IOExceptions. If we make a small change in the ServerWorker to catch all > Exceptions instead of just AxisFaults, Synapse will at least send back a > proper SOAP fault to the client whenever something like this happens. The > above issue however asks for more; they request the ability to mediate this > SOAP fault. I suppose this is also possible but will require more changes. > > Any ideas on the best strategy to resolve this issue? > > Thanks, > Hiranya > -- > Hiranya Jayathilaka > Mayhem Lab/RACE Lab; > Dept. of Computer Science, UCSB; http://cs.ucsb.edu > E-mail: [email protected] <[email protected]>; Mobile: +1 (805) 895-7443 > Blog: > http://techfeast-hiranya.**blogspot.com<http://techfeast-hiranya.blogspot.com/> > >
