You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-dev@xml.apache.org by du...@apache.org on 2001/05/18 16:01:05 UTC
cvs commit: xml-soap/java/src/org/apache/soap/server MessageRouter.java RPCRouter.java
duftler 01/05/18 07:01:04
Modified: java/src/org/apache/soap/server MessageRouter.java
RPCRouter.java
Log:
Added Bill's minor fix to propagate SOAPExceptions without modifying them.
End result is that non-SOAPExceptions are handled exactly the same as
they were before, but if a SOAPException is thrown by the provider of a
service, it is thrown without being modified (or wrapped in another
SOAPException).
Submitted by: William Nagy (nagy@watson.ibm.com)
Reviewed by: Matthew J. Duftler (duftler@us.ibm.com)
Revision Changes Path
1.5 +9 -2 xml-soap/java/src/org/apache/soap/server/MessageRouter.java
Index: MessageRouter.java
===================================================================
RCS file: /home/cvs/xml-soap/java/src/org/apache/soap/server/MessageRouter.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- MessageRouter.java 2001/01/16 14:26:41 1.4
+++ MessageRouter.java 2001/05/18 14:00:58 1.5
@@ -68,8 +68,15 @@
m.invoke (null, new Object[] {dd, targetObject, messageName, args});
}
} catch (InvocationTargetException e) {
- Throwable t = e.getTargetException ();
- throw new SOAPException (Constants.FAULT_CODE_SERVER, t.getMessage(), t);
+ Throwable t = e.getTargetException();
+
+ if (t instanceof SOAPException) {
+ throw (SOAPException)t;
+ } else {
+ throw new SOAPException(Constants.FAULT_CODE_SERVER,
+ t.getMessage (),
+ t);
+ }
} catch (ClassNotFoundException e) {
throw new SOAPException (Constants.FAULT_CODE_SERVER,
"Unable to load BSF: script services " +
1.13 +9 -2 xml-soap/java/src/org/apache/soap/server/RPCRouter.java
Index: RPCRouter.java
===================================================================
RCS file: /home/cvs/xml-soap/java/src/org/apache/soap/server/RPCRouter.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- RPCRouter.java 2001/05/17 17:45:51 1.12
+++ RPCRouter.java 2001/05/18 14:01:00 1.13
@@ -144,8 +144,15 @@
args});
}
} catch (InvocationTargetException e) {
- Throwable t = e.getTargetException ();
- throw new SOAPException (Constants.FAULT_CODE_SERVER, t.getMessage(), t);
+ Throwable t = e.getTargetException();
+
+ if (t instanceof SOAPException) {
+ throw (SOAPException)t;
+ } else {
+ throw new SOAPException(Constants.FAULT_CODE_SERVER,
+ t.getMessage(),
+ t);
+ }
} catch (ClassNotFoundException e) {
throw new SOAPException (Constants.FAULT_CODE_SERVER,
"Unable to load BSF: script services " +