axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Manuel Darveau" <>
Subject Re: AXIS2-3239, 3443
Date Tue, 18 Nov 2008 15:09:44 GMT

I digged in the code and I think the fix should be around
org.apache.axis2.util.MessageContextBuilder:614 or directly on
I have a workaround that consist of injecting the detail on the generated
For example, if my operation's wsdl is:
<xs:schema attributeFormDefault="qualified" elementFormDefault="unqualified"
  <xs:complexType name="Exception">
      <xs:element minOccurs="0" name="Exception" nillable="true"
  <xs:element name="UnauthorizedAccessException">
        <xs:element minOccurs="0" name="UnauthorizedAccessException"
nillable="true" type="ax21:UnauthorizedAccessException"/>
<wsdl:operation name="getSomething">
<wsdl:input message="ns:getSomethingRequest"
<wsdl:output message="ns:getSomethingResponse"
<wsdl:fault message="ns:UnauthorizedAccessException"

I can do in my service:
        AxisFault af = AxisFault.makeFault(new
        af.setDetail(new OMElementImpl("UnauthorizedAccessException", new
OMNamespaceImpl("", "whatever_alias"), new
        throw af;

Note that I can't write a generic exception handler that will trap any
exception and inject the details since I don't know how to determine the
namespace used when defining the exception in the WSDL.
I *think* it will always be the service namespace but I am not sure. Also, I
don't this the "new OMDOMFactory()" part is really clean...

Any other solution?


On Tue, Nov 18, 2008 at 9:44 AM, Eric Decosta <>wrote:

>  I'm interested in a fix as well; it seems that part of the issue is that
> AxisFault.makeFault() doesn't fill-in the Detail element of the Fault.
> Following this example: :
> You can generate just about anything you want for a Fault, but I'd expect
> that if I specified something in the soap:fault for the service that Axis2
> handle things automatically.
> I'm just making some guesses here as I haven't spent much time rummaging
> around in the Axis2 code base.
> -Eric
> *From:* Manuel Darveau []
> *Sent:* Monday, November 17, 2008 4:21 PM
> *To:*
> *Subject:* AXIS2-3239, 3443
> Hi all,
> I known this is a tough question (and most probably better suited for
> axis-dev) but do you have any idea when bug 3239 (and eventually 3443) will
> be fixed.
> Do you have a target?
> In short, the bug is about custom exception handling in the code first
> approach. When you develop a service that throws custom exception(s), the
> WSDL is correctly created including the custom faults but the resulting
> implementation always convert custom exceptions into AxisFault.
> This make it difficult/impossible for clients to catch custom/specific
> exception.
> This is not a show stopper but definitely an annoyance for me. I know you
> will say: "it's open source, you can propose a patch" but I would like to
> know if a fix is already in progress.
> Do you have any pointer for me on where to look for a fix?
> Thank you!
> Manuel

View raw message