I am trying to do some basic exception handling with axis 2 (Using a POJO for
my service). It looks accomplishing this even in the most basic case
introduces circular dependencies.
Is there a clear build pattern that will avoid this?
Must I hand code my wsdl before I start?
What do people do to avoid this?
For example:
========================================
public class MyService {
public boolean myOperation(String param) throws MyException;
}
All I want to do is generate a test client that has some code like this (as in
the fault handling sample):
try {
MyServiceStub.MyOperation request = new MyServiceStub.MyOperation();
request.setParam("13");
stub.myOperation()
}
catch (MyException exception) {
// hande my exception
}
This does not work as I get an AxisFault instead of MyException
I've looked at the samples/faulthandling example.
Why must the MyException class be autogenerated?
Is it strictly required that the service throws the autogenerated MyException?
========================================
I want a nice clean feed forward build process::
MyService.java -> [javac] -> MyService.class ->
[java2wsdl] -> MyServiceMyService.wsdl ->
[wsdl2java] -> MyClientStub.java
However, in order to compile MyService.java I need to the exception defined,
compile my classes, and then
generate my wsdl. I can certainly define a temporary MyException, but it must
be deleted after the service is built, (as in the faulthandling example) or I
will get duplicate classes.
I'm sure there is a simple way to do this.
Thanks
- Justin