[
https://issues.apache.org/jira/browse/CXF-1136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12538487
]
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="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:Fault xmlns:ns2="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns3="http://www.w3.org/2003/05/soap-envelope">
<faultcode>ns2:Server</faultcode>
<faultstring>custom error</faultstring>
<detail>
<ns2:CustomException xmlns:ns2="http://server.hw.demo/">
<a>123</a>
<b>abc</b>
<message>custom error</message>
</ns2:CustomException>
<ns2:exception class="demo.hw.server.CustomException" note="To
disable this feature, set
com.sun.xml.ws.fault.SOAPFaultBuilder.disableCaptureStackTrace system property
to false" xmlns:ns2="http://jax-ws.dev.java.net/">
<message>custom error</message>
<ns2:stackTrace>
<ns2:frame class="demo.hw.server.HelloWorldImpl"
line="unknown" method="sayHi"/>
<ns2:frame class="sun.reflect.NativeMethodAccessorImpl"
line="native" method="invoke0"/>
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: https://issues.apache.org/jira/browse/CXF-1136
> 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, java_first_jaxws.zip
>
>
> 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="http://schemas.xmlsoap.org/soap/envelope/">
> <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 node.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.