[ 
https://issues.apache.org/jira/browse/CXF-4940?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Freeman Fang resolved CXF-4940.
-------------------------------

       Resolution: Fixed
    Fix Version/s: 2.7.5
                   2.6.8
                   2.5.11
                   2.8.0

apply patch on behalf of David G with thanks
http://svn.apache.org/r1465373 for trunk
http://svn.apache.org/r1465526 for 2.7.x branch
http://svn.apache.org/r1465527 for 2.6.x branch
http://svn.apache.org/r1465529 for 2.5.x branch
                
> CXF not (always) responding with the correct exception when working with an 
> exception hierarchy
> -----------------------------------------------------------------------------------------------
>
>                 Key: CXF-4940
>                 URL: https://issues.apache.org/jira/browse/CXF-4940
>             Project: CXF
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.7.4
>            Reporter: David G
>            Assignee: Freeman Fang
>            Priority: Minor
>             Fix For: 2.8.0, 2.5.11, 2.6.8, 2.7.5
>
>         Attachments: FaultOutInterceptor.patch
>
>
> Hi there,
> For a webservice I'm currently building (java first), I have a few custom 
> exceptions arranged in a hierarchy. In order to have them properly declared 
> in the WSDL, I list all possible exceptions in the WebMethod declarations, 
> not only the top ones. That is, if exceptions B->A, I declare :
> @WebMethod
> String helloWorld() throws A,B;
> And it works, as far as the WSDL is concerned.
> What doesn't work is that when requesting the service and raising a 'B' 
> (child) exception, the response embeds an 'A' (parent) fault.
> I seem to have narrowed down the culprit to 
> org.apache.cxf.interceptor.FaultOutInterceptor.getFaultForClass(BindingOperationInfo,Class<?>),
>  which stops at the first exception 'assignable to' the one actually raised. 
> I 'patched' it locally to return the 'closest to the one raised', and it does 
> the trick for me.
> I hope an actual CXF contributor can take a look at this issue. I'm a 
> beginner with CXF, and I might use it improperly. Please bear with me if 
> that's the case :)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to