axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nelson Minar <>
Subject Re: capturing SOAP XML in a client for debug?
Date Fri, 08 Oct 2004 17:30:09 GMT
Thanks for all the suggestions - I particularly like the idea of
giving them a client WSDD that includes the log handler. 

Toshi - the reason SOAPMonitor doesn't work is I'm not going to give
my users that kind of access to my server. I'm not deploying a web
service where I'm also writing the clients; I'm publishing a web
service endpoint that untrusted third parties are calling.

The solution I've got working at the moment is asking my users to call
this function in their client. It's a quick hack to get the Apache
commons logging infrastructure to dump all HTTPSender messages, which
happen to include the XML. The client WSDD is a better idea, working
on that now.

  /** Configure Apache Axis to log XML traffic to a file named xmlLog.txt **/
  public static void enableXMLLogging() {
    java.util.logging.Logger logger =
    try {
      java.util.logging.FileHandler fh =
        new java.util.logging.FileHandler("xmlLog.txt");
      fh.setFormatter(new java.util.logging.SimpleFormatter());
    } catch ( ioex) {
      throw new RuntimeException("Error setting up log file", ioex);

View raw message