In my wsdl, I have a custom fault to throw, as in the following 

<wsdl:operation name="getQueryNames">
      <wsdl:input message="impl:getQueryNamesRequest"
name="getQueryNamesRequest"/>
      <wsdl:output message="impl:getQueryNamesResponse"
name="getQueryNamesResponse"/>
      <wsdl:fault message="impl:SecurityExceptionResponse"
name="SecurityExceptionFault"/>
      <wsdl:fault message="impl:ImplementationExceptionResponse"
name="ImplementationExceptionFault"/>
    </wsdl:operation>

Where SecurityExceptionResponse is a complexType. 

As I understand it, the XML representation of this custom wsdl exception
should go into the Detail of SOAP Fault message. 
<soap:Fault> 
    <soap:Reason>....
    <soap:Detail> .... </soap:Detail>

This is what I did, I create a AxisFault and call setDetail() to set the
OMElement (of the SecurityExceptionresponse). I would expect the axis2
code to use the "detail" to generate the soap:Detail part of the soap
fault, but it did not. I tried to track down the code and found that in
AxisEngine, in 
extractFaultInformationFromMessageContext() method, when the faultDetail
is constructed, it never make use of Axis2 fault. 

Is this a bug ? 

Also, the code also does a setException().. but from reading the spec on
SOAP, there is no Exception field in SOAP fault, right ? 

Rgds
Kheng Kok


Reply via email to