cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dsosno...@apache.org
Subject svn commit: r1159021 - /cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMManager.java
Date Thu, 18 Aug 2011 04:12:23 GMT
Author: dsosnoski
Date: Thu Aug 18 04:12:22 2011
New Revision: 1159021

URL: http://svn.apache.org/viewvc?rev=1159021&view=rev
Log:
Prefer contextual properties in setting the protocol version to be used.

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

Modified: cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMManager.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMManager.java?rev=1159021&r1=1159020&r2=1159021&view=diff
==============================================================================
--- cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMManager.java (original)
+++ cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMManager.java Thu Aug 18 04:12:22
2011
@@ -85,7 +85,7 @@ public class RMManager {
     /**
      * Message contextual property giving addressing namespace to be used by WS-RM implementation.
      */
-    public static final String WSRM10_WSA_VERSION_PROPERTY = "org.apache.cxf.ws.rm.wsa-namespace";
+    public static final String WSRM_WSA_VERSION_PROPERTY = "org.apache.cxf.ws.rm.wsa-namespace";
 
     private static final Logger LOG = LogUtils.getL7dLogger(RMManager.class);
 
@@ -340,13 +340,15 @@ public class RMManager {
      * @return namespace URI
      */
     String getAddressingNamespace(Message message) {
-        AddressingPropertiesImpl maps = RMContextUtils.retrieveMAPs(message, false, false);
-        String addrUri = null;
-        if (maps != null) {
-            addrUri = maps.getNamespaceURI();
-        }
+        String addrUri = (String)message.getContextualProperty(WSRM_WSA_VERSION_PROPERTY);
         if (addrUri == null) {
-            addrUri = getRMAddressingNamespace();
+            AddressingPropertiesImpl maps = RMContextUtils.retrieveMAPs(message, false, false);
+            if (maps != null) {
+                addrUri = maps.getNamespaceURI();
+            }
+            if (addrUri == null) {
+                addrUri = getRMAddressingNamespace();
+            }
         }
         return addrUri;
     }
@@ -359,13 +361,15 @@ public class RMManager {
      * @return namespace URI
      */
     String getRMNamespace(Message message) {
-        RMProperties rmps = RMContextUtils.retrieveRMProperties(message, false);
-        String rmUri = null;
-        if (rmps != null) {
-            rmUri = rmps.getNamespaceURI();
-        }
+        String rmUri = (String)message.getContextualProperty(WSRM_VERSION_PROPERTY);
         if (rmUri == null) {
-            rmUri = getRMNamespace();
+            RMProperties rmps = RMContextUtils.retrieveRMProperties(message, false);
+            if (rmps != null) {
+                rmUri = rmps.getNamespaceURI();
+            }
+            if (rmUri == null) {
+                rmUri = getRMNamespace();
+            }
         }
         return rmUri;
     }



Mime
View raw message