xml-soap-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Reardon <m...@onewebsystems.com>
Subject Uncaught exceptions
Date Mon, 11 Jun 2001 20:39:24 GMT
Forgive if this has already been discussed, but is there any good reason
not to use the java class name of an uncaught exception  in the Fault?
For example if Provider code threw an ClassCastException (lets say be
cause of casting a String to an Integer), the servlet catches it, and
generates a SOAP fault. The resulting Fault would have...

a fault code of:   SOAP-ENV:Server.Exception:
and fault string of:  java.lang.Integer

It sure would be make a more informative message if it looked something
like this...

a fault code of:  
SOAP-ENV:Server.RuntimeException[java.lang.ClassCastException]
and fault string of:  java.lang.Integer

Instead of the following from RPCRouterServler...

        SOAPException e = null;
        if (t instanceof SOAPException)
          e = (SOAPException)t;
        else
          e = new SOAPException(Constants.FAULT_CODE_SERVER +
                                ".Exception:", "", t);


How about something like this...

        SOAPException e = null;
        if (t instanceof SOAPException)
          e = (SOAPException)t;
        else
          e = new SOAPException(Constants.FAULT_CODE_SERVER +
                               
".RuntimeException["+t.getClass().getName()+"]", "", t);



BTW, why does "SOAP-ENV:Server.Exception:" end with a colon? The spec
says that the fault code should be a qualified name; is that a valid
qname with a second :?

Cheers,
Mike Reardon

Mime
View raw message