Repository: cxf Updated Branches: refs/heads/master 10d34e1a8 -> 4670bd247
[CXF-4698] Dig into the fault an extra level to try and find the real fault Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/7463f091 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/7463f091 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/7463f091 Branch: refs/heads/master Commit: 7463f091dcf08fb4bbfe58c261dda6bd1900460c Parents: 10d34e1 Author: Daniel Kulp <[email protected]> Authored: Tue Apr 4 13:16:52 2017 -0400 Committer: Daniel Kulp <[email protected]> Committed: Tue Apr 4 14:48:01 2017 -0400 ---------------------------------------------------------------------- .../apache/cxf/jaxws/interceptors/WebFaultOutInterceptor.java | 6 ++++++ 1 file changed, 6 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/7463f091/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WebFaultOutInterceptor.java ---------------------------------------------------------------------- diff --git a/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WebFaultOutInterceptor.java b/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WebFaultOutInterceptor.java index 4af67a0..799683c 100644 --- a/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WebFaultOutInterceptor.java +++ b/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WebFaultOutInterceptor.java @@ -123,6 +123,12 @@ public class WebFaultOutInterceptor extends FaultOutInterceptor { WebFault fault = null; if (cause != null) { fault = getWebFaultAnnotation(cause.getClass()); + if (fault == null && cause.getCause() != null) { + fault = getWebFaultAnnotation(cause.getCause().getClass()); + if (fault != null || cause instanceof RuntimeException) { + cause = cause.getCause(); + } + } } if (cause instanceof Exception && fault != null) { Exception ex = (Exception)cause;
