axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From az...@apache.org
Subject svn commit: r407261 - in /webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/rpc/receivers: RPCInOnlyMessageReceiver.java RPCInOutAsyncMessageReceiver.java RPCMessageReceiver.java
Date Wed, 17 May 2006 14:10:24 GMT
Author: azeez
Date: Wed May 17 07:10:24 2006
New Revision: 407261

URL: http://svn.apache.org/viewcvs?rev=407261&view=rev
Log:
Added proper logging


Modified:
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/rpc/receivers/RPCInOnlyMessageReceiver.java
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/rpc/receivers/RPCInOutAsyncMessageReceiver.java
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/rpc/receivers/RPCMessageReceiver.java

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/rpc/receivers/RPCInOnlyMessageReceiver.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/rpc/receivers/RPCInOnlyMessageReceiver.java?rev=407261&r1=407260&r2=407261&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/rpc/receivers/RPCInOnlyMessageReceiver.java
(original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/rpc/receivers/RPCInOnlyMessageReceiver.java
Wed May 17 07:10:24 2006
@@ -11,6 +11,8 @@
 import org.apache.axis2.description.AxisMessage;
 import org.apache.axis2.engine.DependencyManager;
 import org.apache.axis2.receivers.AbstractInMessageReceiver;
+import org.apache.commons.logging.LogFactory;
+import org.apache.commons.logging.Log;
 
 import java.lang.reflect.Method;
 /*
@@ -32,6 +34,7 @@
 public class RPCInOnlyMessageReceiver extends AbstractInMessageReceiver {
 
     private Method method;
+    private Log log = LogFactory.getLog(RPCInOnlyMessageReceiver.class);
 
     public void invokeBusinessLogic(MessageContext inMessage) throws AxisFault {
         try {
@@ -40,7 +43,7 @@
 
             Class ImplClass = obj.getClass();
             DependencyManager.configureBusinessLogicProvider(obj,
-                    inMessage.getOperationContext());
+                                                             inMessage.getOperationContext());
 
             AxisOperation op = inMessage.getOperationContext().getAxisOperation();
 
@@ -57,8 +60,8 @@
             OMNamespace namespace = methodElement.getNamespace();
             if (namespace == null || !messageNameSpace.equals(namespace.getName())) {
                 throw new AxisFault("namespace mismatch require " +
-                        service.getSchematargetNamespace() +
-                        " found " + methodElement.getNamespace().getName());
+                                    service.getSchematargetNamespace() +
+                                    " found " + methodElement.getNamespace().getName());
             }
             String methodName = op.getName().getLocalPart();
             Method[] methods = ImplClass.getMethods();
@@ -69,13 +72,12 @@
                 }
             }
             Object[] objectArray = processRequest(methodElement);
-            try {
-                method.invoke(obj, objectArray);
-            } catch (Exception e) {
-                throw new AxisFault(e.getMessage());
-            }
+            method.invoke(obj, objectArray);
         } catch (Exception e) {
-            throw new AxisFault(e);
+            String msg = "Exception occurred while trying to invoke service method " +
+                         method.getName();
+            log.error(msg, e);
+            throw new AxisFault(msg, e);
         }
     }
 

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/rpc/receivers/RPCInOutAsyncMessageReceiver.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/rpc/receivers/RPCInOutAsyncMessageReceiver.java?rev=407261&r1=407260&r2=407261&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/rpc/receivers/RPCInOutAsyncMessageReceiver.java
(original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/rpc/receivers/RPCInOutAsyncMessageReceiver.java
Wed May 17 07:10:24 2006
@@ -12,6 +12,8 @@
 import org.apache.axis2.description.AxisMessage;
 import org.apache.axis2.engine.DependencyManager;
 import org.apache.axis2.receivers.AbstractInOutAsyncMessageReceiver;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 import javax.xml.namespace.QName;
 import java.lang.reflect.Method;
@@ -36,6 +38,7 @@
 public class RPCInOutAsyncMessageReceiver extends AbstractInOutAsyncMessageReceiver {
 
     private Method method;
+    private Log log = LogFactory.getLog(RPCInOnlyMessageReceiver.class);
 
     /**
      * reflect and get the Java method
@@ -123,9 +126,10 @@
             outMessage.setEnvelope(envelope);
 
         } catch (Exception e) {
-            throw AxisFault.makeFault(e);
+            String msg = "Exception occurred while trying to invoke service method " +
+                         method.getName();
+            log.error(msg, e);
+            throw new AxisFault(msg, e);
         }
     }
-
-
 }

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/rpc/receivers/RPCMessageReceiver.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/rpc/receivers/RPCMessageReceiver.java?rev=407261&r1=407260&r2=407261&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/rpc/receivers/RPCMessageReceiver.java
(original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/rpc/receivers/RPCMessageReceiver.java
Wed May 17 07:10:24 2006
@@ -34,6 +34,8 @@
 import org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver;
 import org.apache.axis2.wsdl.WSDLConstants;
 import org.apache.axis2.wsdl.util.CommandLineOptionConstants;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 import javax.xml.namespace.QName;
 import java.lang.reflect.Method;
@@ -42,7 +44,8 @@
 
 
     private Method method;
-
+    private Log log = LogFactory.getLog(RPCInOnlyMessageReceiver.class);
+    
     /**
      * reflect and get the Java method
      * - for each i'th param in the java method
@@ -133,7 +136,10 @@
             outMessage.setEnvelope(envelope);
 
         } catch (Exception e) {
-            throw AxisFault.makeFault(e);
+            String msg = "Exception occurred while trying to invoke service method " +
+                         method.getName();
+            log.error(msg, e);
+            throw new AxisFault(msg, e);
         }
     }
 



Mime
View raw message