>Is there anyway in which i can override the exception stack trace
>which comes in as part of the 'detail' element in the AxisFault and
>give my own customized messages.

One option is to define a custom serializer for your Exception type.
This works but has some issues. It's also a nuisance because you have
to define a serializer for every type of Exception you care about; you
can't just define one for Exception and expect all subclasses to be
treated the same.

Another option is to make a subclass of AxisFault that does what you
want, and then make sure your own service methods only throw this
special type of Exception. I find my code is wrapped like this:
  public String myMethod(String input) {
    try {
      doSomeWork(input);
    } catch (Exception e) {
      throw new MyAxisFault(e);
    }
  }

This is also a nuisance, but it works. It also leaves me wondering if
I've missed something in Axis or if Axis needs a customization hook it
doesn't have.

Reply via email to