You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by "krn1231@gmail.com" <kr...@gmail.com> on 2011/11/10 05:50:34 UTC

How to make CXF SOAP Request to be printed under log file

@InInterceptors(interceptors =
"org.apache.cxf.interceptor.LoggingInInterceptor"  )
@OutInterceptors(interceptors =
"org.apache.cxf.interceptor.LoggingOutInterceptor")

public class SKTWeb implements SKTWeb Service {

// method logic goes here 

}

Hi , after adding these two lines inside the CXF Method Implementation .
I could get whip of  SOAP Requestand Response under tomcat server console 

see a  instance of SOAP Request Printed under Tomcat console 

INFO: Inbound Message
----------------------------
ID: 1
Address: /Sktweb-33.0/services/SKTWeb
Encoding: UTF-8
Content-Type: text/xml; charset=UTF-8
Headers: {cache-control=[no-cache], content-type=[text/xml; charset=UTF-8],
connection=[keep-alive], host=[local
Payload: <soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns4:strategy
xmlns:ns


Could anybody please tell me how can get this inside my Log file (Log4j) 

Currently this is my log4j.properties file 

log4j.rootCategory=INFO, A1

# A1 is a DailyRollingFileAppender

log4j.appender.A1=org.apache.log4j.DailyRollingFileAppender
log4j.appender.A1.file=/Haieeee.log
log4j.appender.A1.datePattern='.'yyyy-MM-dd
log4j.appender.A1.append=true
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%-22d{dd/MMM/yyyy HH:mm:ss} -
%m%n

And also i have META-INF\cxf\org\apache\cxf\Logger Log4jLogger.class inside
the Web Application . And also i kept

&lt;cxf:bus>
<cxf:features>
<cxf:logging/>
</cxf:features>
</cxf:bus> 

Inside the endpoints.xml file

Any help please

--
View this message in context: http://cxf.547215.n5.nabble.com/How-to-make-CXF-SOAP-Request-to-be-printed-under-log-file-tp4980011p4980011.html
Sent from the cxf-user mailing list archive at Nabble.com.