cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r903695 - in /cxf/branches/2.2.x-fixes: ./ rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/ContextUtils.java rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMEndpoint.java
Date Wed, 27 Jan 2010 15:48:21 GMT
Author: dkulp
Date: Wed Jan 27 15:48:21 2010
New Revision: 903695

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

........
  r903681 | dkulp | 2010-01-27 10:27:09 -0500 (Wed, 27 Jan 2010) | 3 lines
  
  [CXF-2629] Fix RM test failures caused by patch.
  Update WS-RM to properly set the WS-A action attributes on it's
  RMEndpoint instead of relying on the SOAPAction stuff.
........

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

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

Modified: cxf/branches/2.2.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/ContextUtils.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/ContextUtils.java?rev=903695&r1=903694&r2=903695&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/ContextUtils.java
(original)
+++ cxf/branches/2.2.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/ContextUtils.java
Wed Jan 27 15:48:21 2010
@@ -32,6 +32,7 @@
 
 import org.apache.cxf.Bus;
 import org.apache.cxf.binding.soap.SoapBindingConstants;
+import org.apache.cxf.binding.soap.model.SoapOperationInfo;
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.endpoint.ConduitSelector;
 import org.apache.cxf.endpoint.Endpoint;
@@ -728,7 +729,6 @@
             }
             if (fault == null) {
                 action = (String) message.get(SoapBindingConstants.SOAP_ACTION);
-               
                 if (action == null || "".equals(action)) {
                     MessageInfo msgInfo = 
                         ContextUtils.isRequestor(message)
@@ -740,6 +740,11 @@
                     } else {
                         action = cachedAction;
                     }
+                    if (action == null && ContextUtils.isRequestor(message)) {
+                        SoapOperationInfo soi = 
+                            bindingOpInfo.getExtensor(SoapOperationInfo.class);
+                        action = soi == null ? null : soi.getAction();
+                    }
                 }
             } else {
                 Throwable t = fault.getCause();

Modified: cxf/branches/2.2.x-fixes/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMEndpoint.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMEndpoint.java?rev=903695&r1=903694&r2=903695&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMEndpoint.java (original)
+++ cxf/branches/2.2.x-fixes/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMEndpoint.java Wed
Jan 27 15:48:21 2010
@@ -53,6 +53,7 @@
 import org.apache.cxf.service.model.OperationInfo;
 import org.apache.cxf.service.model.ServiceInfo;
 import org.apache.cxf.transport.Conduit;
+import org.apache.cxf.ws.addressing.JAXWSAConstants;
 import org.apache.cxf.ws.addressing.Names;
 import org.apache.cxf.ws.policy.EffectivePolicy;
 import org.apache.cxf.ws.policy.EndpointPolicy;
@@ -462,55 +463,39 @@
             SoapBindingInfo bi = new SoapBindingInfo(si, bindingId, sv);
             bi.setName(BINDING_NAME);
             BindingOperationInfo boi = null;
-            SoapOperationInfo soi = null;
 
             boi = bi.buildOperation(RMConstants.getCreateSequenceOperationName(), RMConstants
                 .getCreateSequenceOperationName().getLocalPart(), null);
-            soi = new SoapOperationInfo();
-            soi.setAction(RMConstants.getCreateSequenceAction());
-            boi.addExtensor(soi);
+            addAction(boi,
+                      RMConstants.getCreateSequenceAction(),
+                      RMConstants.getCreateSequenceResponseAction());
             bi.addOperation(boi);
 
             boi = bi.buildOperation(RMConstants.getTerminateSequenceOperationName(), RMConstants
                 .getTerminateSequenceOperationName().getLocalPart(), null);
-            soi = new SoapOperationInfo();
-            soi.setAction(RMConstants.getTerminateSequenceAction());
-            boi.addExtensor(soi);
+            addAction(boi, RMConstants.getTerminateSequenceAction());
             bi.addOperation(boi);
 
             boi = bi.buildOperation(RMConstants.getSequenceAckOperationName(), null, null);
-            assert null != boi;
-            soi = new SoapOperationInfo();
-            soi.setAction(RMConstants.getSequenceAckAction());
-            boi.addExtensor(soi);
+            addAction(boi, RMConstants.getSequenceAckAction());
             bi.addOperation(boi);
 
             boi = bi.buildOperation(RMConstants.getLastMessageOperationName(), null, null);
-            assert null != boi;
-            soi = new SoapOperationInfo();
-            soi.setAction(RMConstants.getLastMessageAction());
-            boi.addExtensor(soi);
+            addAction(boi, RMConstants.getLastMessageAction());
             bi.addOperation(boi);
 
             boi = bi.buildOperation(RMConstants.getAckRequestedOperationName(), null, null);
-            assert null != boi;
-            soi = new SoapOperationInfo();
-            soi.setAction(RMConstants.getAckRequestedAction());
-            boi.addExtensor(soi);
+            addAction(boi, RMConstants.getAckRequestedAction());
             bi.addOperation(boi);
 
             boi = bi.buildOperation(RMConstants.getCreateSequenceOnewayOperationName(), RMConstants
                 .getCreateSequenceOperationName().getLocalPart(), null);
-            soi = new SoapOperationInfo();
-            soi.setAction(RMConstants.getCreateSequenceAction());
-            boi.addExtensor(soi);
+            addAction(boi, RMConstants.getCreateSequenceAction());
             bi.addOperation(boi);
 
             boi = bi.buildOperation(RMConstants.getCreateSequenceResponseOnewayOperationName(),
RMConstants
                 .getCreateSequenceResponseOperationName().getLocalPart(), null);
-            soi = new SoapOperationInfo();
-            soi.setAction(RMConstants.getCreateSequenceResponseAction());
-            boi.addExtensor(soi);
+            addAction(boi, RMConstants.getCreateSequenceResponseAction());
             bi.addOperation(boi);
 
             si.addBinding(bi);
@@ -519,6 +504,23 @@
         // TODO: BindingFaultInfo (SequenceFault)
     }
 
+    private void addAction(BindingOperationInfo boi, String action) {
+        addAction(boi, action, action);
+    }
+    private void addAction(BindingOperationInfo boi, String action, String outputAction)
{
+        SoapOperationInfo soi = new SoapOperationInfo();
+        soi.setAction(action);
+        boi.addExtensor(soi);
+
+        MessageInfo info = boi.getOperationInfo().getInput();
+        info.addExtensionAttribute(JAXWSAConstants.WSAW_ACTION_QNAME, action);
+        
+        info = boi.getOperationInfo().getOutput();
+        if (info != null) {
+            info.addExtensionAttribute(JAXWSAConstants.WSAW_ACTION_QNAME, outputAction);
+        }
+    }
+
     Object getUsingAddressing(EndpointInfo endpointInfo) {
         if (null == endpointInfo) {
             return null;



Mime
View raw message