You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by na...@apache.org on 2008/10/15 14:39:40 UTC
svn commit: r704893 -
/webservices/axis2/trunk/java/modules/mtompolicy-mar/src/org/apache/axis2/mtompolicy/MTOMPolicy.java
Author: nandana
Date: Wed Oct 15 05:39:39 2008
New Revision: 704893
URL: http://svn.apache.org/viewvc?rev=704893&view=rev
Log:
logging the information
Modified:
webservices/axis2/trunk/java/modules/mtompolicy-mar/src/org/apache/axis2/mtompolicy/MTOMPolicy.java
Modified: webservices/axis2/trunk/java/modules/mtompolicy-mar/src/org/apache/axis2/mtompolicy/MTOMPolicy.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/mtompolicy-mar/src/org/apache/axis2/mtompolicy/MTOMPolicy.java?rev=704893&r1=704892&r2=704893&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/mtompolicy-mar/src/org/apache/axis2/mtompolicy/MTOMPolicy.java (original)
+++ webservices/axis2/trunk/java/modules/mtompolicy-mar/src/org/apache/axis2/mtompolicy/MTOMPolicy.java Wed Oct 15 05:39:39 2008
@@ -7,19 +7,33 @@
import org.apache.axis2.description.AxisModule;
import org.apache.axis2.modules.Module;
import org.apache.axis2.policy.model.MTOMAssertion;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.apache.neethi.Assertion;
import org.apache.neethi.Policy;
-public class MTOMPolicy implements Module{
+public class MTOMPolicy implements Module {
+
+ /*
+ * setup for logging
+ */
+ private static final Log log = LogFactory.getLog(MTOMPolicy.class);
public void applyPolicy(Policy policy, AxisDescription axisDescription)
throws AxisFault {
- // TODO Auto-generated method stub
-
+ if (log.isDebugEnabled()) {
+ log.debug("applyPolicy() called on MTOMPolicy module");
+ }
+
}
public boolean canSupportAssertion(Assertion assertion) {
-
+
+ if (log.isDebugEnabled()) {
+ log.debug("canSupportAssertion called on MTOMPolicy module with "
+ + assertion.getName().toString() + " assertion");
+ }
+
if (assertion instanceof MTOMAssertion) {
return true;
}
@@ -28,34 +42,43 @@
}
public void engageNotify(AxisDescription axisDescription) throws AxisFault {
-
+
+ if (log.isDebugEnabled()) {
+ log.debug("MTOMPolicy module has been engaged to "
+ + axisDescription.getClass().getName());
+ }
+
boolean isOptional = false;
-
+
MTOMAssertion mtomAssertion = Utils.getMTOMAssertion(axisDescription);
if (mtomAssertion == null) {
return;
}
-
- if ( isOptional) {
- axisDescription.addParameter("enableMTOM", Constants.VALUE_OPTIONAL);
+
+ if (isOptional) {
+ axisDescription
+ .addParameter("enableMTOM", Constants.VALUE_OPTIONAL);
} else {
axisDescription.addParameter("enableMTOM", Constants.VALUE_TRUE);
}
-
-
+
}
public void init(ConfigurationContext configContext, AxisModule module)
throws AxisFault {
- // nothing to do here yet
-
+ if (log.isDebugEnabled()) {
+ log.debug("init() called on MTOMPolicy module");
+ }
+
}
public void shutdown(ConfigurationContext configurationContext)
throws AxisFault {
- // nothing to do here yet
-
+ if (log.isDebugEnabled()) {
+ log.debug("shutdown() called on MTOMPolicy module");
+ }
+
}
}