JBossWS - Log4j

JBossWS logging can be configured the same way as other JBoss applications. You need to edit the Log4J configuration of the application server; for details please refer to the Logging.

.

Apart from configuring the logs according to your applications needs, when testing web services both during development and staging phase, you might be interested in making the JBossWS stack a little bit more verbose. Some interesting logs emitted by the native core include SOAP message traces and eventual dump of messages before encryption and after decryption (when using WS-Security). The default log4j configuration the application server comes out with does not emit these logs since they're at TRACE level. For this reason here follow two sample log4j configurations you can use to selectively enable them:

Native stack message trace

 <category name="org.jboss.ws.core.MessageTrace">
  <priority value="TRACE"/>
 </category>

This enables logs of incoming and outcoming SOAP messages.

 

WS-Security dispatcher logs

 <category name="org.jboss.ws.extensions.security.WSSecurityDispatcher">
  <priority value="TRACE"/>
 </category>

This enable all logs emitted by WSSecurityDispatcher which is responsible for handling every incoming and outcoming WS-Security message. In particular, when encryption is on, you'll get logs of messages just before their encryption and after their decryption. This is valuable since of course you can't easily analyze encrypted message captured with a man-in-the-middle approach.