cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r938191 - /cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Proxy.java
Date Mon, 26 Apr 2010 18:54:07 GMT
Author: ffang
Date: Mon Apr 26 18:54:06 2010
New Revision: 938191

URL: http://svn.apache.org/viewvc?rev=938191&view=rev
Log:
[CXF-2786]ws-rm Proxy should send SequenceAcknowledgement according to AcksTo URI header

Modified:
    cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Proxy.java

Modified: cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Proxy.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Proxy.java?rev=938191&r1=938190&r2=938191&view=diff
==============================================================================
--- cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Proxy.java (original)
+++ cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Proxy.java Mon Apr 26 18:54:06 2010
@@ -75,7 +75,7 @@ public class Proxy {
         
         OperationInfo oi = reliableEndpoint.getEndpoint().getEndpointInfo().getService().getInterface()
             .getOperation(RMConstants.getSequenceAckOperationName());
-        invoke(oi, new Object[] {}, null);
+        invoke(oi, new Object[] {ds}, null);
     }
     
     void terminate(SourceSequence ss) throws RMException {
@@ -239,8 +239,23 @@ public class Proxy {
         Endpoint endpoint = reliableEndpoint.getEndpoint();
         BindingInfo bi = reliableEndpoint.getBindingInfo();
         Conduit c = reliableEndpoint.getConduit();
-        org.apache.cxf.ws.addressing.EndpointReferenceType replyTo = reliableEndpoint.getReplyTo();
-        Client client = createClient(bus, endpoint, c, replyTo);
+        Client client = null;
+        if (params.length > 0 && params[0] instanceof DestinationSequence) {
+            EndpointReferenceType acksTo = 
+                ((DestinationSequence)params[0]).getAcksTo();
+            String acksAddress = acksTo.getAddress().getValue();
+            org.apache.cxf.ws.addressing.AttributedURIType attrURIType = 
+                new org.apache.cxf.ws.addressing.AttributedURIType();
+            attrURIType.setValue(acksAddress);
+            org.apache.cxf.ws.addressing.EndpointReferenceType acks = 
+                new org.apache.cxf.ws.addressing.EndpointReferenceType();
+            acks.setAddress(attrURIType);
+            client = createClient(bus, endpoint, c, acks);
+            params = new Object[] {};
+        } else {
+            org.apache.cxf.ws.addressing.EndpointReferenceType replyTo = reliableEndpoint.getReplyTo();
+            client = createClient(bus, endpoint, c, replyTo);
+        }
         
         BindingOperationInfo boi = bi.getOperation(oi);
         try {



Mime
View raw message