Can you post the setup you have used? You might also want to look into you ESB-message properties, especially the fault. If it still is filled you might want to try to empty it. And see how that works. Another possibility is to throw a new ActionProcessingException(String message) with your message as a parameter (after catching it ofcourse).

I have a situation where I need to catch the exception lets say java.net.UnknownHostException which gets thrown when my wise.SOAPClient action cannot download .wsdl while calling a SOAP service on other server. I have an action which has processException method implemented before it starts the action chain indeed gets called after that above exception is thrown and I want to return a custom message to consumer and not HTTP 500 (as this is a synch call with http gateway listener), in this processException method I tried editing the message body with custom XML message and throwing ActionProcessingFaultException from that - doesnt work. It simply returns http 500 to user instead of custom message. The moment I force an action to throw ActionProcessingFaultException before my SOAPClient is called - it works perfect. do u know whats the problem? or how do we do it in such situations

Perhaps you should make a new thread because this one is already labelled solved. On what to do with exceptions, it depends. If you can't replace the original message in the exception, you will have to catch the exception yourself. This means writing somekind of wrapper around your SOAPClient which catches your exception. I have for example wrapped the process method of my httprouter to check the returned message. If its anything other than the expected format, I know something went wrong an can act on it. So you might want to try using httprouter instead of the SOAPClient if all fails.