You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by ay...@apache.org on 2011/08/30 14:43:37 UTC

svn commit: r1163192 - in /cxf/branches/2.4.x-fixes: ./ rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Messages.properties rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMManager.java

Author: ay
Date: Tue Aug 30 12:43:37 2011
New Revision: 1163192

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

........
  r1163168 | ay | 2011-08-30 12:45:02 +0200 (Tue, 30 Aug 2011) | 1 line
  
  [CXF-3777] WS-RM provider may try to send a CreateSequence message to the anonymous endpoint
........

Modified:
    cxf/branches/2.4.x-fixes/   (props changed)
    cxf/branches/2.4.x-fixes/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Messages.properties
    cxf/branches/2.4.x-fixes/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMManager.java

Propchange: cxf/branches/2.4.x-fixes/
------------------------------------------------------------------------------
    svn:mergeinfo = /cxf/trunk:1163168

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

Modified: cxf/branches/2.4.x-fixes/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Messages.properties
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Messages.properties?rev=1163192&r1=1163191&r2=1163192&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Messages.properties (original)
+++ cxf/branches/2.4.x-fixes/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Messages.properties Tue Aug 30 12:43:37 2011
@@ -36,6 +36,7 @@ INVALID_ACK_EXC = The SequenceAcknowledg
 MESSAGE_NR_ROLLOVER_EXC = The maximum value for wsrm:MessageNumber has been exceeded.
 LAST_MESSAGE_NUMBER_EXCEEDED_EXC = The value for wsrm:MessageNumber exceeds the value of the MessageNumber accompanying a LastMessage element in this Sequence.
 CREATE_SEQ_REFUSED = The create sequence request has been refused by the RM destination.
+CREATE_SEQ_ANON_TARGET = It is not possible to send a create sequence request to the anonymous address {0}
 
 SEQ_FAULT_MSG = Interceptor encountered a SequenceFault: {0}.
 MAPS_RETRIEVAL_FAILURE_MSG = Failed to retrieve message addressing properties from context - not ensuring reliable delivery.

Modified: cxf/branches/2.4.x-fixes/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMManager.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMManager.java?rev=1163192&r1=1163191&r2=1163192&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMManager.java (original)
+++ cxf/branches/2.4.x-fixes/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMManager.java Tue Aug 30 12:43:37 2011
@@ -53,6 +53,7 @@ import org.apache.cxf.service.model.Serv
 import org.apache.cxf.transport.Conduit;
 import org.apache.cxf.ws.addressing.AddressingProperties;
 import org.apache.cxf.ws.addressing.AddressingPropertiesImpl;
+import org.apache.cxf.ws.addressing.ContextUtils;
 import org.apache.cxf.ws.addressing.MAPAggregator;
 import org.apache.cxf.ws.addressing.RelatesToType;
 import org.apache.cxf.ws.addressing.VersionTransformer;
@@ -338,6 +339,14 @@ public class RMManager {
                 }
             }
 
+            if (ContextUtils.isGenericAddress(to)) {
+                org.apache.cxf.common.i18n.Message msg = new org.apache.cxf.common.i18n.Message(
+                    "CREATE_SEQ_ANON_TARGET", LOG, 
+                    to != null && to.getAddress() != null 
+                    ? to.getAddress().getValue() : null);
+                LOG.log(Level.INFO, msg.toString());
+                throw new RMException(msg);
+            }
             Proxy proxy = source.getReliableEndpoint().getProxy();
             CreateSequenceResponseType createResponse = proxy.createSequence(acksTo, relatesTo, isServer);
             if (!isServer) {