Tuesday, January 7, 2014

Logging apache cxf Soap request/response pay load.


Hi,

   In order to log SOAP request and response payload of apache cxf we need to follow below steps.
 
   1. create a  folder structure below under src or classes package
        --WEB-INF
                ---cxf
                 
   2. create a org.apache.cxf file with extension .Logger under cxf folder.
         like org.apache.cxf.Logger. Add a code snippet org.apache.cxf.common.logging.Log4jLogger
        under Logger file.
 
   3. Add below statement in your  log4j properties file.
          log4j.logger.org.apache.cxf=info

  After completing the above steps now the request and response payload will be write into log file.


      

4 comments: