Author: dkulp
Date: Mon Aug 13 19:07:30 2012
New Revision: 1372554

URL: http://svn.apache.org/viewvc?rev=1372554&view=rev
Log:
Merged revisions 1372552 via  git cherry-pick from
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1372552 | dkulp | 2012-08-13 15:00:44 -0400 (Mon, 13 Aug 2012) | 2 lines

  The wsam:Action needs to also be checked as that can override the soapAction 
stuff in the WSDL.

........

Modified:
    
cxf/branches/2.6.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapActionInInterceptor.java

Modified: 
cxf/branches/2.6.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapActionInInterceptor.java
URL: 
http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapActionInInterceptor.java?rev=1372554&r1=1372553&r2=1372554&view=diff
==============================================================================
--- 
cxf/branches/2.6.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapActionInInterceptor.java
 (original)
+++ 
cxf/branches/2.6.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapActionInInterceptor.java
 Mon Aug 13 19:07:30 2012
@@ -39,6 +39,7 @@ import org.apache.cxf.message.Message;
 import org.apache.cxf.phase.Phase;
 import org.apache.cxf.service.model.BindingOperationInfo;
 import org.apache.cxf.service.model.OperationInfo;
+import org.apache.cxf.ws.addressing.JAXWSAConstants;
 
 public class SoapActionInInterceptor extends AbstractSoapInterceptor {
     
@@ -104,7 +105,7 @@ public class SoapActionInInterceptor ext
             getAndSetOperation(message, action);
         }
     }
-
+    
     private void getAndSetOperation(SoapMessage message, String action) {
         if (StringUtils.isEmpty(action)) {
             return;
@@ -128,6 +129,17 @@ public class SoapActionInInterceptor ext
                     }
                     bindingOp = boi;
                 }
+                Object o = 
boi.getOperationInfo().getInput().getExtensionAttribute(JAXWSAConstants.WSAM_ACTION_QNAME);
+                if (o == null) {
+                    o = 
boi.getOperationInfo().getInput().getExtensionAttribute(JAXWSAConstants.WSAW_ACTION_QNAME);
+                }
+                if (o != null && action.equals(o.toString())) {
+                    if (bindingOp != null && bindingOp != boi) {
+                        //more than one op with the same action, will need to 
parse normally
+                        return;
+                    }
+                    bindingOp = boi;
+                }
             }
         }
         
@@ -161,6 +173,15 @@ public class SoapActionInInterceptor ext
             if (soi == null || action.equals(soi.getAction())) {
                 return;
             }
+
+            Object o = 
boi.getOperationInfo().getInput().getExtensionAttribute(JAXWSAConstants.WSAM_ACTION_QNAME);
+            if (o == null) {
+                o = 
boi.getOperationInfo().getInput().getExtensionAttribute(JAXWSAConstants.WSAW_ACTION_QNAME);
+            }
+            if (o != null && action.equals(o.toString())) {
+                return;
+            }
+            
             throw new Fault("SOAP_ACTION_MISMATCH", LOG, null, action);
         }
     }


Reply via email to