cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From egl...@apache.org
Subject svn commit: r555315 - in /incubator/cxf/trunk: rt/core/src/main/java/org/apache/cxf/service/invoker/ rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/ systests/src/test/java/org/apache/cxf/systest/ws/policy/
Date Wed, 11 Jul 2007 15:54:06 GMT
Author: eglynn
Date: Wed Jul 11 08:54:05 2007
New Revision: 555315

URL: http://svn.apache.org/viewvc?view=rev&rev=555315
Log:
Setting fallback fault action on fault responses.


Modified:
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/service/invoker/AbstractInvoker.java
    incubator/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/MAPAggregator.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/RMPolicyTest.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/RMPolicyWsdlTest.java

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?view=diff&rev=555315&r1=555314&r2=555315
==============================================================================
--- 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 Jul 11 08:54:05 2007
@@ -83,6 +83,9 @@
             }
             exchange.getInMessage().put(FaultMode.class, FaultMode.CHECKED_APPLICATION_FAULT);
             throw new Fault(t);
+        } catch (Fault f) {
+            exchange.getInMessage().put(FaultMode.class, FaultMode.UNCHECKED_APPLICATION_FAULT);
+            throw f;
         } catch (Exception e) {
             exchange.getInMessage().put(FaultMode.class, FaultMode.UNCHECKED_APPLICATION_FAULT);
             throw new Fault(e);

Modified: incubator/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/MAPAggregator.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/MAPAggregator.java?view=diff&rev=555315&r1=555314&r2=555315
==============================================================================
--- incubator/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/MAPAggregator.java
(original)
+++ incubator/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/MAPAggregator.java
Wed Jul 11 08:54:05 2007
@@ -419,6 +419,7 @@
             } else if (maps.getTo() == null && inMAPs.getReplyTo() != null) {
                 maps.setTo(inMAPs.getReplyTo());
             }
+
             // RelatesTo taken from MessageID in incoming MAPs
             if (inMAPs.getMessageID() != null
                 && !Boolean.TRUE.equals(message.get(Message.PARTIAL_RESPONSE_MESSAGE)))
{
@@ -426,6 +427,12 @@
                 maps.setRelatesTo(ContextUtils.getRelatesTo(inMessageID));
             }
 
+            // fallback fault action
+            if (isFault && maps.getAction() == null) {
+                maps.setAction(ContextUtils.getAttributedURI(
+                    Names.WSA_DEFAULT_FAULT_ACTION));
+            }
+ 
             if (isFault
                 && !ContextUtils.isGenericAddress(inMAPs.getFaultTo())) {
                 ContextUtils.rebaseResponse(inMAPs.getFaultTo(),

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/RMPolicyTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/RMPolicyTest.java?view=diff&rev=555315&r1=555314&r2=555315
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/RMPolicyTest.java
(original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/RMPolicyTest.java
Wed Jul 11 08:54:05 2007
@@ -38,6 +38,7 @@
 import org.apache.cxf.systest.ws.util.OutMessageRecorder;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
 import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
+import org.apache.cxf.ws.addressing.Names;
 import org.apache.cxf.ws.rm.RMConstants;
 
 import org.junit.BeforeClass;
@@ -55,7 +56,8 @@
     private static final String GREETME_ACTION = null;
     private static final String GREETME_RESPONSE_ACTION = null;
     private static final String PINGME_ACTION = null;
-    private static final String PINGME_RESPONSE_ACTION = null;
+    private static final String PINGME_RESPONSE_ACTION = 
+        Names.WSA_DEFAULT_FAULT_ACTION;
 
     public static class Server extends AbstractBusTestServerBase {
     
@@ -157,7 +159,7 @@
         expectedActions = new String[] {
             RMConstants.getCreateSequenceResponseAction(),
             GREETME_RESPONSE_ACTION,
-            PINGME_RESPONSE_ACTION,
+            GREETME_RESPONSE_ACTION,
             PINGME_RESPONSE_ACTION
         };
         mf.verifyActions(expectedActions, false);

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/RMPolicyWsdlTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/RMPolicyWsdlTest.java?view=diff&rev=555315&r1=555314&r2=555315
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/RMPolicyWsdlTest.java
(original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/RMPolicyWsdlTest.java
Wed Jul 11 08:54:05 2007
@@ -38,6 +38,7 @@
 import org.apache.cxf.systest.ws.util.OutMessageRecorder;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
 import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
+import org.apache.cxf.ws.addressing.Names;
 import org.apache.cxf.ws.rm.RMConstants;
 
 import org.junit.BeforeClass;
@@ -55,7 +56,9 @@
     private static final String GREETME_ACTION = null;
     private static final String GREETME_RESPONSE_ACTION = null;
     private static final String PINGME_ACTION = null;
-    private static final String PINGME_RESPONSE_ACTION = null;
+    private static final String PINGME_RESPONSE_ACTION = 
+        Names.WSA_DEFAULT_FAULT_ACTION;
+
 
     public static class Server extends AbstractBusTestServerBase {
     
@@ -158,7 +161,7 @@
         expectedActions = new String[] {
             RMConstants.getCreateSequenceResponseAction(),
             GREETME_RESPONSE_ACTION,
-            PINGME_RESPONSE_ACTION,
+            GREETME_RESPONSE_ACTION,
             PINGME_RESPONSE_ACTION
         };
         mf.verifyActions(expectedActions, false);



Mime
View raw message