cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r648774 - in /incubator/cxf/trunk: rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/ rt/core/src/main/java/org/apache/cxf/service/invoker/ systests/src/test/java/org/apache/cxf/systest/coloc/
Date Wed, 16 Apr 2008 18:10:30 GMT
Author: dkulp
Date: Wed Apr 16 11:10:24 2008
New Revision: 648774

URL: http://svn.apache.org/viewvc?rev=648774&view=rev
Log:
[CXF-1534] If the service throws a CXF Fault, just pass that up unwrapped to not lose anything.

Modified:
    incubator/cxf/trunk/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/WebFaultInInterceptor.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/service/invoker/AbstractInvoker.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/coloc/AbstractHeaderServiceRpcLitTest.java

Modified: incubator/cxf/trunk/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/WebFaultInInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/WebFaultInInterceptor.java?rev=648774&r1=648773&r2=648774&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/WebFaultInInterceptor.java
(original)
+++ incubator/cxf/trunk/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/WebFaultInInterceptor.java
Wed Apr 16 11:10:24 2008
@@ -47,7 +47,11 @@
             Fault f = (Fault) ex;
             ex = (Exception) f.getCause();
         }
-        
+        if (ex == null) { 
+            return;
+        }
+
+
         QName faultName = this.getFaultName(ex);
         if (faultName == null) {
             return;

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/service/invoker/AbstractInvoker.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/service/invoker/AbstractInvoker.java?rev=648774&r1=648773&r2=648774&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/service/invoker/AbstractInvoker.java
(original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/service/invoker/AbstractInvoker.java
Wed Apr 16 11:10:24 2008
@@ -92,6 +92,9 @@
                 t = e;
             }
             exchange.getInMessage().put(FaultMode.class, FaultMode.CHECKED_APPLICATION_FAULT);
+            if (t instanceof Fault) {
+                throw (Fault)t;
+            }
             throw createFault(t, m, params, true);
         } catch (Fault f) {
             exchange.getInMessage().put(FaultMode.class, FaultMode.UNCHECKED_APPLICATION_FAULT);

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/coloc/AbstractHeaderServiceRpcLitTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/coloc/AbstractHeaderServiceRpcLitTest.java?rev=648774&r1=648773&r2=648774&view=diff
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/coloc/AbstractHeaderServiceRpcLitTest.java
(original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/coloc/AbstractHeaderServiceRpcLitTest.java
Wed Apr 16 11:10:24 2008
@@ -211,7 +211,8 @@
             ht.pingMe(in);
             fail("Should throw a CXF Fault exception");
         } catch (WebServiceException fault) {
-            assertFalse(-1 == fault.getMessage().lastIndexOf(HeaderTesterUtil.EX_STRING));
+            assertFalse("Wrong message: " + fault.getMessage(),
+                        -1 == fault.getMessage().lastIndexOf(HeaderTesterUtil.EX_STRING));
             if (isFaultCodeCheckEnabled()) {
                 verifyFaultCode(port);
             }



Mime
View raw message