You are viewing a plain text version of this content. The canonical link for it is here.
Posted to muse-commits@ws.apache.org by da...@apache.org on 2006/10/02 23:59:27 UTC
svn commit: r452240 -
/webservices/muse/trunk/modules/muse-platform-axis2/src/org/apache/muse/core/platform/axis2/AxisIsolationLayer.java
Author: danj
Date: Mon Oct 2 14:59:27 2006
New Revision: 452240
URL: http://svn.apache.org/viewvc?view=rev&rev=452240
Log:
fix for MUSE-95
Modified:
webservices/muse/trunk/modules/muse-platform-axis2/src/org/apache/muse/core/platform/axis2/AxisIsolationLayer.java
Modified: webservices/muse/trunk/modules/muse-platform-axis2/src/org/apache/muse/core/platform/axis2/AxisIsolationLayer.java
URL: http://svn.apache.org/viewvc/webservices/muse/trunk/modules/muse-platform-axis2/src/org/apache/muse/core/platform/axis2/AxisIsolationLayer.java?view=diff&rev=452240&r1=452239&r2=452240
==============================================================================
--- webservices/muse/trunk/modules/muse-platform-axis2/src/org/apache/muse/core/platform/axis2/AxisIsolationLayer.java (original)
+++ webservices/muse/trunk/modules/muse-platform-axis2/src/org/apache/muse/core/platform/axis2/AxisIsolationLayer.java Mon Oct 2 14:59:27 2006
@@ -16,13 +16,17 @@
package org.apache.muse.core.platform.axis2;
+import java.util.logging.Level;
+
import org.w3c.dom.Element;
import org.apache.axiom.om.OMElement;
+import org.apache.axiom.soap.SOAPEnvelope;
import org.apache.axis2.context.OperationContext;
import org.apache.muse.core.Environment;
import org.apache.muse.core.platform.AbstractIsolationLayer;
+import org.apache.muse.util.LoggingUtils;
import org.apache.muse.ws.addressing.MessageHeaders;
/**
@@ -128,6 +132,9 @@
* implements it. When this method is called, we first check to see
* if Muse has bee initialized - if not, we kick off initialization.
* We then proceed with normal request handling.
+ * <br/><br/>
+ * This method also logs the incoming SOAP message if the Muse logging
+ * level is set to FINE.
*
* @param opContext
*
@@ -147,7 +154,7 @@
}
//
- // for all requests, we need to save the OpContext so that
+ // for all requests, we need to save the addressing headers so that
// we can access the SOAP envelope in handleRequest()
//
if (!hasFailedToInitialize())
@@ -155,6 +162,27 @@
AxisEnvironment env = (AxisEnvironment)getRouter().getEnvironment();
MessageHeaders wsa = env.convertContext(opContext);
env.addAddressingContext(wsa);
+
+ //
+ // log incoming SOAP envelope now so we don't have to store
+ // it for handleRequest().
+ //
+ // NOTE: This is kind of hack-ish, but we check to see if the
+ // current log level is 'FINE' before we try and log the
+ // message. We don't actually have to do this - the JDK
+ // logging API fine() will do this for us - but because
+ // we have to translate from Axiom to DOM once already,
+ // I don't want to do it twice unless the tracing is being
+ // used. If SOAP-level tracing is on, it's likely that this
+ // is not being used in a production system, so we can afford
+ // the performance hit of an extra conversion.
+ //
+ if (getRouter().getLog().getLevel() == Level.FINE)
+ {
+ SOAPEnvelope soap = env.getInputMessageContext(opContext).getEnvelope();
+ Element soapAsDOM = env.convertToDOM(soap);
+ LoggingUtils.logMessage(getRouter().getLog(), soapAsDOM, true);
+ }
}
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: muse-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-commits-help@ws.apache.org