From 839d2e210e25f69f86890f6ab9348f9637293341 Mon Sep 17 00:00:00 2001 From: Arjen Poutsma Date: Tue, 8 Apr 2008 13:12:49 +0000 Subject: [PATCH] SWS-319 --- src/docbkx/common.xml | 48 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/src/docbkx/common.xml b/src/docbkx/common.xml index af976760..a6fa30a1 100644 --- a/src/docbkx/common.xml +++ b/src/docbkx/common.xml @@ -384,4 +384,52 @@ public class MyXPathClass { }]]> +
+ Message Logging and Tracing + + When developing or debugging a Web service, it can be quite useful to look at the content of a (SOAP) + message when it arrives, or just before it is sent. Spring Web Services offer this functionality, via the + standard Commons Logging interface. + + + + Make sure to use Commons Logging version 1.1 or higher. Earlier versions have class loading issues, and + do not integrate with the Log4J TRACE level. + + + + To log all server-side messages, simply set the + org.springframework.ws.server.MessageTracing logger to level DEBUG or TRACE. On the debug + level, only the payload root element is logged; on the TRACE level, the entire message content. + If you only want to log sent messages, use the + org.springframework.ws.server.MessageTracing.sent logger; or + org.springframework.ws.server.MessageTracing.received to log received messages. + + + On the client-side, similar loggers exist: + org.springframework.ws.client.MessageTracing.sent and + org.springframework.ws.client.MessageTracing.received. + + + Here is an example log4j.properties configuration, logging the full content of + sent messages on the client side, and only the payload root element for client-side received messages. On + the server-side, the payload root is logged for both sent and received messages: + + + + With this configuration, a typical output will be: + + +
\ No newline at end of file