7 Replies Latest reply on Jan 5, 2012 10:43 AM by kdesineedi

    How to print SOAP messages in a BA transaction

    adrianfdz

      Hello everyone,

       

      I’m developing a test structure for WS using jbossts. I would like to print the SOAP messages exchanged in the Business Activity transaction but I don’t know how. I’m using jboss6.0.0-Final. Is there a way? Thanks for your help and sorry for my bad english

       

      I’ve already tried to enable these lines in jboss-logging.xml and set the root logger priority to TRACE, with no result:

       

      <!-- Enable JBossWS message tracing -->
         <logger category="org.jboss.ws.core.MessageTrace">
           <level name="TRACE"/>
         </logger>
      
      

       

      I’ve also edited the file jbossws-cxf-client/META-INF/cxf/xcf-extension-jbossws.xml in the jar client/jbossws-cxf-client.jar adding these lines but still see nothing:

       

        <bean id="logInbound" class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
        <bean id="logOutbound" class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
        <cxf:bus>
          <cxf:inInterceptors>
            <ref bean="logInbound"/>
          </cxf:inInterceptors>
          <cxf:outInterceptors>
            <ref bean="logOutbound"/>
          </cxf:outInterceptors>
          <cxf:inFaultInterceptors>
            <ref bean="logOutbound"/>
          </cxf:inFaultInterceptors>
                      <cxf:features>
                  <cxf:logging/>
          </cxf:features>
        </cxf:bus>
      
      
        • 1. Re: How to print SOAP messages in a BA transaction
          kdesineedi

          Hi Adrian,

           

          I am also facing the same problem.Were you able to find a solution for this?I am able to see both the request/response in the server.log

           

          Saludos

          Kartheek

          • 2. Re: How to print SOAP messages in a BA transaction
            adrianfdz

            Hi!

             

            I solved this by editing the src of jboss xts, adding several SOAP handlers.

             

            Regards

            • 3. Re: How to print SOAP messages in a BA transaction
              kdesineedi

              Thanks Adrian.Is it possible for you to provide us with some detailed steps of what you have done?

               

              ~Saludos

              Kartheek

              • 4. Re: How to print SOAP messages in a BA transaction
                paul.robinson

                Kartheek,

                 

                Probably the easiest way to add extra SOAP handlers, would be to edit the handlers XML file. This file is referenced from the @HandlerChain annotation on your Web service. You will see the XTS handler in this file. Add yours to the list. This prevents you from having to edit the XTS source code.

                 

                You could also use a tool like TCPMon or soapUI to intercept SOAP messages, without editing the application code.

                 

                Paul.

                1 of 1 people found this helpful
                • 5. Re: How to print SOAP messages in a BA transaction
                  adrianfdz

                  Paul Robinson escribió:

                   

                  Probably the easiest way to add extra SOAP handlers, would be to edit the handlers XML file. This file is referenced from the @HandlerChain annotation on your Web service. You will see the XTS handler in this file. Add yours to the list. This prevents you from having to edit the XTS source code.

                  This allows you to get the SOAP sended or recieved by you're web service but I needed to get the SOAP messages exchanged by the coordinator and the participant in a transaction

                   

                  In order to get these messages, you can add your SOAP handler by editting the XTS/WS-T/dev/dd/ws-t_handlers.xml.

                   

                  Paul Robinson escribió:

                   

                  You could also use a tool like TCPMon or soapUI to intercept SOAP messages, without editing the application code.

                  If you only need to get the SOAP messages, using a tool could be the best solution

                  • 6. Re: How to print SOAP messages in a BA transaction
                    adinn

                    Another alternative is to use Byteman to inject code which prints the SOAP messages. That way you don't need to rebuild/redeploy XTS. In fact you can even install the Byteman agent and the trace code while the AS and your XTS app is running and then remove it later.

                    • 7. Re: How to print SOAP messages in a BA transaction
                      kdesineedi

                      Thanks all.I have added the following configuration to the jbosslog4j xml and routed them to a custom log file.

                       

                        <category name="org.jboss.ws.core.MessageTrace">

                          <priority value="TRACE"/>

                                <appender-ref ref="<my_log_file_name>"/>

                         </category>

                       

                      Saludos

                      ~K