XFireHome DocumentationJavadocs QuicklinksAegis Binding DevelopersDeveloper Space |
Logging SystemXFire uses Commons Logging to provide you with debugging information. If you are having problems probably the first thing you'll want to do is turn up the debugging to DEBUG level. Here's a sample log4j.properties file which will do that: # Set root logger level to DEBUG and its only appender to A1. log4j.rootLogger=DEBUG, A1 # A1 is set to be a ConsoleAppender. log4j.appender.A1=org.apache.log4j.ConsoleAppender # A1 uses PatternLayout. log4j.appender.A1.layout=org.apache.log4j.PatternLayout log4j.appender.A1.layout.ConversionPattern=MIT: %-4r [%t] %-5p %c %x - %m%n log4j.category.org.codehaus.xfire = DEBUG log4j.category.org.apache.commons.httpclient = WARN log4j.category.httpclient.wire = WARN You may want to tweak the httpclient categories to actually see the message. Logging the messagesBy virtue of XFire being stax based, it never caches the whole message in memory. However sometimes you need access to the whole message to debug. Turning it on is simple: Service service = ...; // Tell XFire to cache a DOM document for the various in/out/fault flows service.addInHandler(new org.codehaus.xfire.util.dom.DOMInHandler()); service.addOutHandler(new org.codehaus.xfire.util.dom.DOMOutHandler()); service.addFaultHandler(new org.codehaus.xfire.util.dom.DOMOutHandler()); // Add a logging handler to each flow service.addInHandler(new org.codehaus.xfire.util.LoggingHandler()); service.addOutHandler(new org.codehaus.xfire.util.LoggingHandler()); service.addFaultHandler(new org.codehaus.xfire.util.LoggingHandler()); |