2 Replies Latest reply on Mar 29, 2007 3:39 AM by christophe leconte

    Problem to trace SOAP Message when an exception occures!

    christophe leconte Newbie

      Hi,

      In order to see the SOAP Message I developped my Handler that extends GenericHandler.
      Bellow the extract code of my Handler


      public boolean handleRequest(MessageContext msgContext){
      try {
      SOAPMessage soapMessage = ((SOAPMessageContext)msgContext).getMessage();
      soapMessage.writeTo(System.out);
      }
      catch (Exception e){
      // to do
      }
      return true;
      }

      public boolean handleResponse(MessageContext msgContext) {
      try{
      SOAPMessage soapMessage = ((SOAPMessageContext)msgContext).getMessage();
      soapMessage.writeTo(System.out);
      }
      catch (Exception e) {
      // to do
      }
      return true;
      }

      Globally I can see the SOAP message in the stdout console,
      but when my method throws my UserException it happens two things :
      - I don't the see the SOAP message in the stdout. that means that the handleResponse method has never called. why ?

      - I see the following Execption in the stdout console but the client application receive well formatted SOAP Message with the Fault.


      10:05:24,586 ERROR [SOAPFaultHelperJAXRPC] SOAP request exception
      com.eservglobal.topupapi.ComplexUserException: user is equals to password
      at com.eservglobal.topupapi.TopupServiceBean.login(TopupServiceBean.java:35)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      How can I do to :
      - catch the SOAP message in my Hanlder to trace SOAP Message ?
      - avoid that JBOSS traces the stack Exception in the stdout console ?

      Can you help me?

      Best Regards.

      manosurf