0 Replies Latest reply on Jul 15, 2010 11:03 AM by Prasad B L V

    Re: Custom response message instead stack trace in http gateway when an exception occurs

    Prasad B L V Newbie

      Hi All,


           Given below is the snippet of my jboss-esb.xml. I want to set the response code and a customized user friendly custom message instead of stack trace, when an exception occurs. Can anyone help me with this?


        <service category="Index" description="" invmScope="GLOBAL" name="List">
          <http-gateway name="Index" urlPattern="index/*">
            <mapping class="com.my.MyActionException" status="502"/>      
         <actions mep="RequestResponse">
         <action class="com.my.Test1" name="print"/>



      Given below is my class MyActionException.java:


      import org.jboss.soa.esb.actions.ActionProcessingException;
      public class MyActionException extends ActionProcessingException {
          public MyActionException(String message) {


      In the class Test1.java, I am throwing a MyActionException.


      I am getting the error code as 502 and message , but with the complete stack trace. I need to display only the message not the whole stack trace.


      Any suggestions would be very helpful. Thanks in advance.




      Prasad B L V