Author: dkulp
Date: Tue Jan  4 21:26:19 2011
New Revision: 1055184

URL: http://svn.apache.org/viewvc?rev=1055184&view=rev
Log:
[CXF-3218] The SecConv interceptor pre-validates the action.  Skip it in
the MAPAggregator

Modified:
    
cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/MAPAggregator.java
    
cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/SecureConversationInInterceptor.java

Modified: 
cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/MAPAggregator.java
URL: 
http://svn.apache.org/viewvc/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/MAPAggregator.java?rev=1055184&r1=1055183&r2=1055184&view=diff
==============================================================================
--- 
cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/MAPAggregator.java
 (original)
+++ 
cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/MAPAggregator.java
 Tue Jan  4 21:26:19 2011
@@ -87,7 +87,8 @@ public class MAPAggregator extends Abstr
     public static final String ADDRESSING_DISABLED = 
MAPAggregator.class.getName() + ".addressingDisabled";
     public static final String DECOUPLED_DESTINATION = 
MAPAggregator.class.getName() 
         + ".decoupledDestination";
-
+    public static final String ACTION_VERIFIED = MAPAggregator.class.getName() 
+ ".actionVerified";
+    
     private static final Logger LOG = 
         LogUtils.getL7dLogger(MAPAggregator.class);
     private static final ResourceBundle BUNDLE = LOG.getResourceBundle();
@@ -1160,6 +1161,7 @@ public class MAPAggregator extends Abstr
             if (s == null && headers != null) {
                 s = headers.get(Names.SOAP_ACTION_HEADER.toLowerCase());
             }
+            
             if (maps.getAction() == null || maps.getAction().getValue() == 
null) {
                 String reason =
                     BUNDLE.getString("MISSING_ACTION_MESSAGE");
@@ -1170,7 +1172,8 @@ public class MAPAggregator extends Abstr
                 valid = false;
             }
             
-            if (s != null && s.size() > 0 && valid) {
+            if (s != null && s.size() > 0 && valid 
+                && 
!MessageUtils.isTrue(message.get(MAPAggregator.ACTION_VERIFIED))) {
                 String sa = s.get(0);
                 if (sa.startsWith("\"")) {
                     sa = sa.substring(1, sa.lastIndexOf('"'));

Modified: 
cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/SecureConversationInInterceptor.java
URL: 
http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/SecureConversationInInterceptor.java?rev=1055184&r1=1055183&r2=1055184&view=diff
==============================================================================
--- 
cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/SecureConversationInInterceptor.java
 (original)
+++ 
cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/SecureConversationInInterceptor.java
 Tue Jan  4 21:26:19 2011
@@ -46,12 +46,14 @@ import org.apache.cxf.phase.AbstractPhas
 import org.apache.cxf.phase.Phase;
 import org.apache.cxf.service.Service;
 import org.apache.cxf.service.invoker.Invoker;
+import org.apache.cxf.service.model.BindingOperationInfo;
 import org.apache.cxf.staxutils.W3CDOMStreamWriter;
 import org.apache.cxf.transport.Destination;
 import org.apache.cxf.ws.addressing.AddressingProperties;
 import org.apache.cxf.ws.addressing.AddressingPropertiesImpl;
 import org.apache.cxf.ws.addressing.AttributedURIType;
 import org.apache.cxf.ws.addressing.JAXWSAConstants;
+import org.apache.cxf.ws.addressing.MAPAggregator;
 import org.apache.cxf.ws.policy.AssertionInfo;
 import org.apache.cxf.ws.policy.AssertionInfoMap;
 import org.apache.cxf.ws.policy.EndpointPolicy;
@@ -249,6 +251,9 @@ class SecureConversationInInterceptor ex
             endpoint.getService().setInvoker(new STSInvoker());
             ex.put(Endpoint.class, endpoint);
             ex.put(Service.class, endpoint.getService());
+            ex.put(org.apache.cxf.binding.Binding.class, 
endpoint.getBinding());
+            ex.remove(BindingOperationInfo.class);
+            message.put(MAPAggregator.ACTION_VERIFIED, Boolean.TRUE);
         } catch (Exception exc) {
             throw new Fault(exc);
         }


Reply via email to