Author: ffang
Date: Mon Apr 26 18:57:33 2010
New Revision: 938196

URL: http://svn.apache.org/viewvc?rev=938196&view=rev
Log:
Merged revisions 938191 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r938191 | ffang | 2010-04-27 02:54:06 +0800 (二, 27  4 2010) | 1 line
  
  [CXF-2786]ws-rm Proxy should send SequenceAcknowledgement according to AcksTo 
URI header
........

Modified:
    cxf/branches/2.2.x-fixes/   (props changed)
    
cxf/branches/2.2.x-fixes/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Proxy.java

Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: 
cxf/branches/2.2.x-fixes/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Proxy.java
URL: 
http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Proxy.java?rev=938196&r1=938195&r2=938196&view=diff
==============================================================================
--- 
cxf/branches/2.2.x-fixes/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Proxy.java 
(original)
+++ 
cxf/branches/2.2.x-fixes/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Proxy.java 
Mon Apr 26 18:57:33 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 {


Reply via email to