THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
- If the originating exception is a Business exception and conversions fails should we have a Tuscany standard runtime exception that will have basic message from the originating exception set ? Should we just pick one of the business exceptions on receiving operation ? This might be more robust than throwing a runtime exception.
- What runtime exception should undeclared, checked exceptions be wrappered in? Tuscany defined ? just RuntimeException ? java.lang.reflect.UndeclaredThrowableException? I can see an SCA client still wanting to be "robust" capturing this and acting on it.
- Will not directly validate webservices exceptions until axis binding is at incubator-snapshot (kernel trunk) level
- How are we currently mapping operations during wiring in Tuscany with respect to exceptions ? Need to see if Exceptions are part of operations signature.
Implementation Decisions
- Currently we are unwrappering at the TargetInvokerExtension all exceptions and passing them on the message path.
- System exceptions happening during the processing of a message are thrown up the stack.
- We have made some decision on the support of SDO exception wrappers and example of can be seen in the exceptionXbindingTest iTest
This closely resembles the JAX-B pattern in dealing with faults. One exception is we currently have a FAULT_ELEMENT field type QName on the exception to help tie back to original wsdl element it is associate to.
Appendix
Axis2 WSDL2Java
Code Block | ||
---|---|---|
| ||
package stockexceptiontestservice.scatesttool; public class InvalidSymbolFaultException extends java.lang.Exception{ private stockexceptiontestservice.scatesttool.InvalidSymbolFault faultMessage; public InvalidSymbolFaultException() { super("InvalidSymbolFaultException"); } public InvalidSymbolFaultException(java.lang.String s) { super(s); } public InvalidSymbolFaultException(java.lang.String s, java.lang.Throwable ex) { super(s, ex); } public void setFaultMessage(stockexceptiontestservice.scatesttool.InvalidSymbolFault msg){ faultMessage = msg; } public stockexceptiontestservice.scatesttool.InvalidSymbolFault getFaultMessage(){ return faultMessage; } } |
Note |
---|
The generated exception has the getter and setter for the fault: setFaultMessage(...) and getFaultMessage() and that's the pattern Axis2 adopts for web service fault to java exception mapping. The InvalidSymbolFault is a generated class to represent the fault. It can be generated using different databindings such as ADB, JAXB (and hopefully SDO in the future). |
Implementation Decisions
...
. |
JAX-WS RI 2.1 WSDL2Java
Rick provided the WSDL and generated code from JAX-WS RI 2.1.
...