Repository: cxf Updated Branches: refs/heads/2.7.x-fixes 7d43995fe -> cd473b33a
[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/cd473b33 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/cd473b33 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/cd473b33 Branch: refs/heads/2.7.x-fixes Commit: cd473b33aad8989c97d6e2b7bc90dea8ff56d692 Parents: 7d43995 Author: Kyle Lape <[email protected]> Authored: Mon Dec 1 14:34:23 2014 -0800 Committer: Akitoshi Yoshida <[email protected]> Committed: Tue Dec 23 23:15:27 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/cd473b33/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 7b68d47..058dd08 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());
