cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andreasm...@apache.org
Subject svn commit: r554946 - in /incubator/cxf/trunk: rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/ systests/src/test/java/org/apache/cxf/systest/ws/rm/
Date Tue, 10 Jul 2007 13:49:16 GMT
Author: andreasmyth
Date: Tue Jul 10 06:49:14 2007
New Revision: 554946

URL: http://svn.apache.org/viewvc?view=rev&rev=554946
Log:
Used SequenceAckowledgement wsa:action for acks piggybacked on partial responses (previously
only for out-of-band acknowledgement messages).

Modified:
    incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMOutInterceptor.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/ClientPersistenceTest.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/SequenceTest.java

Modified: incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMOutInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMOutInterceptor.java?view=diff&rev=554946&r1=554945&r2=554946
==============================================================================
--- incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMOutInterceptor.java
(original)
+++ incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMOutInterceptor.java
Tue Jul 10 06:49:14 2007
@@ -30,6 +30,7 @@
 import org.apache.cxf.message.Message;
 import org.apache.cxf.message.MessageUtils;
 import org.apache.cxf.ws.addressing.AddressingProperties;
+import org.apache.cxf.ws.addressing.AttributedURIType;
 import org.apache.cxf.ws.addressing.MAPAggregator;
 import org.apache.cxf.ws.addressing.VersionTransformer;
 import org.apache.cxf.ws.addressing.v200408.AttributedURI;
@@ -159,6 +160,11 @@
             AttributedURI to = VersionTransformer.convert(maps.getTo());
             assert null != to;
             addAcknowledgements(destination, rmpsOut, inSeqId, to);
+            if (isPartialResponse && rmpsOut.getAcks() != null && rmpsOut.getAcks().size()
> 0) {
+                AttributedURIType actionURI = new AttributedURIType();
+                actionURI.setValue(RMConstants.getSequenceAcknowledgmentAction());
+                maps.setAction(actionURI);
+            }
         } 
         
         if (RMConstants.getSequenceAckAction().equals(action)

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/ClientPersistenceTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/ClientPersistenceTest.java?view=diff&rev=554946&r1=554945&r2=554946
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/ClientPersistenceTest.java
(original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/ClientPersistenceTest.java
Tue Jul 10 06:49:14 2007
@@ -175,11 +175,11 @@
 
 
         mf.verifyMessages(3, false);
-        mf.verifyPartialResponses(2);
-        mf.verifyAcknowledgements(new boolean[] {false, true, true}, false);        
-        mf.purgePartialResponses();
-        expectedActions = new String[] {RMConstants.getCreateSequenceResponseAction()};
+        expectedActions = new String[] {RMConstants.getCreateSequenceResponseAction(),
+                                        RMConstants.getSequenceAcknowledgmentAction(),
+                                        RMConstants.getSequenceAcknowledgmentAction()};
         mf.verifyActions(expectedActions, false);
+        mf.verifyAcknowledgements(new boolean[] {false, true, true}, false);        
     }
     
     void verifyStorePopulation() {

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/SequenceTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/SequenceTest.java?view=diff&rev=554946&r1=554945&r2=554946
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/SequenceTest.java
(original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/SequenceTest.java
Tue Jul 10 06:49:14 2007
@@ -201,7 +201,10 @@
         // createSequenceResponse plus 3 partial responses
         
         mf.verifyMessages(4, false);
-        expectedActions = new String[] {RMConstants.getCreateSequenceResponseAction(), null,
null, null};
+        expectedActions = new String[] {RMConstants.getCreateSequenceResponseAction(),
+                                        RMConstants.getSequenceAcknowledgmentAction(),
+                                        RMConstants.getSequenceAcknowledgmentAction(),
+                                        RMConstants.getSequenceAcknowledgmentAction()};
         mf.verifyActions(expectedActions, false);
         mf.verifyMessageNumbers(new String[] {null, null, null, null}, false);
         mf.verifyAcknowledgements(new boolean[] {false, true, true, true}, false);
@@ -240,7 +243,8 @@
 
         mf.verifyMessages(4, false);
         expectedActions = 
-            new String[] {RMConstants.getCreateSequenceResponseAction(), null, null, null};
+            new String[] {RMConstants.getCreateSequenceResponseAction(), null, null, 
+                          RMConstants.getSequenceAcknowledgmentAction()};
         mf.verifyActions(expectedActions, false);
         mf.verifyMessageNumbers(new String[] {null, null, null, null}, false);
         mf.verifyAcknowledgements(new boolean[] {false, false, false, true}, false);
@@ -334,9 +338,9 @@
         mf.verifyMessages(6, false);
 
         expectedActions = new String[] {RMConstants.getCreateSequenceResponseAction(), 
-                                        null, null,
+                                        RMConstants.getSequenceAcknowledgmentAction(), null,
                                         RMConstants.getCreateSequenceResponseAction(), 
-                                        null, null};
+                                        RMConstants.getSequenceAcknowledgmentAction(), null};
         mf.verifyActions(expectedActions, false);
         mf.verifyMessageNumbers(new String[] {null, null, null, null, null, null}, false);
         mf.verifyLastMessage(new boolean[] {false, false, false, false, false, false}, false);
@@ -854,7 +858,10 @@
         
         mf.verifyMessages(5, false);
         expectedActions = new String[] {RMConstants.getCreateSequenceResponseAction(),
-                                        null, null, null, null};
+                                        RMConstants.getSequenceAcknowledgmentAction(),
+                                        RMConstants.getSequenceAcknowledgmentAction(),
+                                        RMConstants.getSequenceAcknowledgmentAction(),
+                                        RMConstants.getSequenceAcknowledgmentAction()};
         mf.verifyActions(expectedActions, false);
         mf.verifyMessageNumbers(new String[] {null, null, null, null, null}, false);
         mf.verifyAcknowledgements(new boolean[] {false, true, true, true, true}, false);
@@ -1057,8 +1064,10 @@
                 // createSequenceResponse plus 3 partial responses
 
                 mf.verifyMessages(4, false);
-                expectedActions = new String[] {RMConstants.getCreateSequenceResponseAction(),
null, null,
-                                                null};
+                expectedActions = new String[] {RMConstants.getCreateSequenceResponseAction(),

+                                                RMConstants.getSequenceAcknowledgmentAction(),
+                                                RMConstants.getSequenceAcknowledgmentAction(),
+                                                RMConstants.getSequenceAcknowledgmentAction()};
                 mf.verifyActions(expectedActions, false);
                 mf.verifyMessageNumbers(new String[] {null, null, null, null}, false);
                 mf.verifyAcknowledgements(new boolean[] {false, true, true, true}, false);



Mime
View raw message