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 Mon, 29 Oct 2007 13:15:50 GMT


ed p commented on CXF-1136:

I've tested my sample code using Axis 1.4 and GlassFish Metro. Both worked with the response
containing the exception in the fault/detail node.

Here's the sample response generated by GlassFish Metro:

<S:Envelope xmlns:S="">
      <ns2:Fault xmlns:ns2="" xmlns:ns3="">
         <faultstring>custom error</faultstring>
            <ns2:CustomException xmlns:ns2="http://server.hw.demo/">
               <message>custom error</message>
            <ns2:exception class="demo.hw.server.CustomException" note="To disable this
feature, set system property
to false" xmlns:ns2="">
               <message>custom error</message>
                  <ns2:frame class="demo.hw.server.HelloWorldImpl" line="unknown" method="sayHi"/>
                  <ns2:frame class="sun.reflect.NativeMethodAccessorImpl" line="native"

Okay well that's it from me as I need to move on evaluating other WS projects. Thanks for
your input Glen.

> 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