Sunday, February 3, 2008

Enabling SSL/ http debugging for Axis2

Well, after some struggle googling, I found the way to printout the logging stmts for webservices.
All you have to do is put these statements in your client -


System.setProperty("org.apache.commons.logging.Log", "org.apache.commons.logging.impl.SimpleLog");
System.setProperty("org.apache.commons.logging.simplelog.showdatetime", "true");
System.setProperty("org.apache.commons.logging.simplelog.log.httpclient.wire", "debug");
System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.commons.httpclient","debug");

and this is what you get...

2008/02/03 13:22:40:296 EST [DEBUG] DefaultHttpParams - Set parameter http.useragent = Jakarta Commons-HttpClient/3.0.1
2008/02/03 13:22:40:312 EST [DEBUG] DefaultHttpParams - Set parameter http.protocol.version = HTTP/1.1
2008/02/03 13:22:40:312 EST [DEBUG] DefaultHttpParams - Set parameter http.connection-manager.class = class org.apache.commons.httpclient.SimpleHttpConnectionManager
2008/02/03 13:22:40:312 EST [DEBUG] DefaultHttpParams - Set parameter http.protocol.cookie-policy = rfc2109
2008/02/03 13:22:40:312 EST [DEBUG] DefaultHttpParams - Set parameter http.protocol.element-charset = US-ASCII

No comments: