Repository: cxf Updated Branches: refs/heads/3.0.x-fixes 4684d12e4 -> 83cce3a23
[CXF-6127] Check cause for SOAPFaultException to populate subcodes and locale Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/83cce3a2 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/83cce3a2 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/83cce3a2 Branch: refs/heads/3.0.x-fixes Commit: 83cce3a23e2d976147a12a97a72c89dcabc6f08c Parents: 4684d12 Author: Kyle Lape <[email protected]> Authored: Mon Dec 1 14:34:23 2014 -0800 Committer: Akitoshi Yoshida <[email protected]> Committed: Tue Dec 23 23:13:40 2014 +0100 ---------------------------------------------------------------------- .../cxf/jaxws/interceptors/WebFaultOutInterceptor.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/83cce3a2/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 882e9d2..4d2a014 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 @@ -92,8 +92,14 @@ public class WebFaultOutInterceptor extends FaultOutInterceptor { return; } try { - if (f.getCause().getClass().equals(SOAPFaultException.class)) { - SOAPFaultException sf = (SOAPFaultException) (f.getCause()); + Throwable thr = f.getCause(); + SOAPFaultException sf = null; + if (thr instanceof SOAPFaultException) { + sf = (SOAPFaultException)thr; + } else if (thr.getCause() instanceof SOAPFaultException) { + sf = (SOAPFaultException)thr.getCause(); + } + if (sf != null) { if (f instanceof SoapFault) { for (Iterator<QName> it = CastUtils.cast(sf.getFault().getFaultSubcodes()); it.hasNext();) { ((SoapFault) f).addSubCode(it.next());
