cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ed p (JIRA)" <>
Subject [jira] Commented: (CXF-1136) Custom exception not appearing in SOAP fault response
Date Fri, 26 Oct 2007 14:27:51 GMT


ed p commented on CXF-1136:

yes I understand where you are going but what I'm really trying to do is evaluate CXF for
my project. The requirements of my project requires a Java first approach. CXF documentation
states that it supports java/pojo development so I ran the pojo sample code and then added
the modification of throwing an exception.
Now I am still not clear if there's a bug in the reverse engineering process or whether there
is some sort of exception that I need to extend to get this to work or modifying my exception
as in my previous comment. I took a look at XFire and to do what I want the exception needs
to extend FaultInfoException and implement getFaultInfo and getFaultName. This actually worked
in XFire but it doesn't work in CXF .. well the FaultInfoException isn't exactly the same
as it is located in the client package.
Another possiblity as you mentioned is to perform a java to wsdl .. modify the wsdl .. perform
wsdl to java but that's a huge workaround. If I have to resort to that then clearly CXF doesn't
support pojo development with exceptions.

> Custom exception not appearing in SOAP fault response
> -----------------------------------------------------
>                 Key: CXF-1136
>                 URL:
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 2.0.2
>         Environment: WIndows XP
> Java SDK 1.5_0_12
>            Reporter: ed p
>            Priority: Critical
>         Attachments: helloWorld.wsdl,
> I modified the apache-cxf-2.0.2-incubator\samples\java_first_jaxws web service to throw
a custom exception and a custom request and response object like so:
> public interface HelloWorld {
>     Response sayHi(Request text) throws CustomException;
> }
> CustomException is a CustomExceptionBase with two string properties. CustomExceptionBase
is a java.lang.Exception
> The CustomException appears in the WSDL but the CustomExceptionBase is missing. When
the service is invoked and throws a CustomException the soap response is:
> <soap:Envelope xmlns:soap="">
>    <soap:Body>
>       <soap:Fault>
>          <faultcode>soap:Server</faultcode>
>          <faultstring>custom error</faultstring>
>       </soap:Fault>
>    </soap:Body>
> </soap:Envelope>
> I am expecting to see the CustomException serialized in the Envelope/Body/Fault/detail

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message