[
https://issues.apache.org/jira/browse/CXF-3712?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13080842#comment-13080842
]
Sergey Beryozkin commented on CXF-3712:
---------------------------------------
Hi
that is actually already supported from the start, for example the following
xml-formatted message is returned in one of JAX-RS tests:
String data = "<ns1:XMLFault
xmlns:ns1=\"http://cxf.apache.org/bindings/xformat\">"
+ "<ns1:faultstring
xmlns:ns1=\"http://cxf.apache.org/bindings/xformat\">"
+ "org.apache.cxf.systest.jaxrs.BookNotFoundFault: Book
Exception</ns1:faultstring>"
+ "</ns1:XMLFault>";
XMLFaultOutInterceptor reports it - one has to set
"org.apache.cxf.propagate.exception" property to false.
The name of the property is different, but I think that in context of JAX-RS
services it makes sense, given that
JAX-RS spec requires the propagation of uncaught exceptions by default.
I think registering a custom RuntimeException mapper would offer more
flexibility, example, XML or JSON based representation
can be easily created...
I think this issue can be closed...
> disable exception stack traces in CXF Rest
> ------------------------------------------
>
> Key: CXF-3712
> URL: https://issues.apache.org/jira/browse/CXF-3712
> Project: CXF
> Issue Type: New Feature
> Components: JAX-RS
> Affects Versions: 2.2.10
> Reporter: David Liu
> Priority: Minor
>
> Hi,
> The *faultStackTraceEnabled* flag in Soap Endpoint is very useful. and I am
> wondering if we can have the same flag in CXF's Restful service endpoint.
> PS. I know we can use ExceptionMapper in CXF Restful endpoint, however, a
> faultStackTraceEnabled flag would be very useful for all developers. thanks.
> David
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira