cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kouss <>
Subject Re: Custom Exceptions mapping to SOAP Faults
Date Thu, 08 Jan 2009 13:30:37 GMT


I have a problem with CXF Soap faults.
I have a wsdl in which I have defined a custom Fault (BadCredentialsFault).
Below is a part of the wsdl : 

       <xsd:element name="BadCredentialsFault"
type="tns:BadCredentialsFault" />
       <xsd:complexType name="BadCredentialsFault">
                    <xsd:element name="message"
    <wsdl:message name="BadCredentialsException">
        <wsdl:part name="BadCredentialsException"
    <wsdl:portType name="AuthenticationService">
        <wsdl:operation name="authenticate">
            <wsdl:input message="tns:authenticateRequest" />
            <wsdl:output message="tns:authenticateResponse" />
            <wsdl:fault name="BadCredentialsException"
<wsdl:binding name="authenticationServiceSoapBinding"
        <soap:binding style="document"
transport="" />
        <wsdl:operation name="authenticate">
soapAction="" />
                <soap:body use="literal" />
                <soap:body use="literal" />
            <wsdl:fault name="BadCredentialsException">
                <soap:fault name="BadCredentialsException" use="literal"/>

On the client side I absolutely need to have a BadCredentialsException
instead of SOAPFaultException but I notice that CXF wrapps my custom
exception BadCredentialsException into a  SOAPFaultException...
I have this xml flow : note that <detail> element is empty 
<soap:Envelope xmlns:soap="">
         <faultstring>Bad credentials for login 'tata'</faultstring>
            <stackTrace xmlns=""/>

Is there a way to get the real exception on the client side instead of a

View this message in context:
Sent from the cxf-user mailing list archive at

View raw message