|
Hi, I wrote a very simple java class which contained a
simple echoString method throwing a custom exception and deployed it in the
axis (java version) running the Tomcat 5.0. The following shows the code snippet
for this echoString method: Public String echoString(String str)throws MyException { if(str==null)throw new MyException(“a
null string”); return str; } The tomcat is started after deploying it successfully,
and then I wrote a simple client to invoke this method with passing the null
parameter. I want to know if I may catch MyException like: try { …the client code } catch(MyException mex) { … } Finally, I found that I couldn’t catch
MyException only AxisFault. Please help make me clear that the axis
doesn’t support this kind of exception catch mechanism, and maybe some
other web service servers support it. Thanks, William |
