scheu 02/05/16 12:41:38
Modified: java/src/org/apache/axis/providers/java RPCProvider.java
java/src/org/apache/axis/utils resources.properties
Log:
If the dispatch fails due to an illegal argument exception, catch the message
and pass back a message that is more useful (in an AxisFault).
Revision Changes Path
1.60 +23 -1
xml-axis/java/src/org/apache/axis/providers/java/RPCProvider.java
Index: RPCProvider.java
===================================================================
RCS file:
/home/cvs/xml-axis/java/src/org/apache/axis/providers/java/RPCProvider.java,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -r1.59 -r1.60
--- RPCProvider.java 16 May 2002 18:50:09 -0000 1.59
+++ RPCProvider.java 16 May 2002 19:41:38 -0000 1.60
@@ -223,7 +223,29 @@
}
// OK! Now we can invoke the method
- Object objRes = operation.getMethod().invoke(obj, argValues);
+ Object objRes = null;
+ try {
+ objRes = operation.getMethod().invoke(obj, argValues);
+ } catch (IllegalArgumentException e) {
+ String methodSig = operation.getMethod().toString();
+ String argClasses = "";
+ for (int i=0; i < argValues.length; i++) {
+ if (argValues[i] == null) {
+ argClasses += "null";
+ } else {
+ argClasses += argValues[i].getClass().getName();
+ }
+ if (i+1 < argValues.length) {
+ argClasses += ",";
+ }
+ }
+ log.info(JavaUtils.getMessage("dispatchIAE00",
+ methodSig,
+ argClasses), e);
+ throw new AxisFault(JavaUtils.getMessage("dispatchIAE00",
+ methodSig,
+ argClasses), e);
+ }
/* Now put the result in the result SOAPEnvelope */
/*************************************************/
1.100 +1 -0 xml-axis/java/src/org/apache/axis/utils/resources.properties
Index: resources.properties
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/utils/resources.properties,v
retrieving revision 1.99
retrieving revision 1.100
diff -u -r1.99 -r1.100
--- resources.properties 16 May 2002 17:45:00 -0000 1.99
+++ resources.properties 16 May 2002 19:41:38 -0000 1.100
@@ -840,3 +840,4 @@
j2woptsoapAction00=value of the operation's soapAction field. Values are DEFAULT,
OPERATION or NONE. OPERATION forces soapAction to the name of the operation. DEFAULT
causes the soapAction to be set according to the operation's meta data (usually "").
NONE forces the soapAction to "". The default is DEFAULT.
j2wBadSoapAction00=The value of --soapAction must be DEFAULT, NONE or OPERATION.
+dispatchIAE00=Tried to invoke {0} but the arguments do not match the caller's
signature. The classes of the calling arguments are: {1}.