You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2012/08/14 17:45:17 UTC

svn commit: r1372932 - /cxf/branches/2.5.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapActionInInterceptor.java

Author: dkulp
Date: Tue Aug 14 15:45:16 2012
New Revision: 1372932

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

........
  r1372554 | dkulp | 2012-08-13 15:07:30 -0400 (Mon, 13 Aug 2012) | 10 lines

  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.5.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapActionInInterceptor.java

Modified: cxf/branches/2.5.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.5.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapActionInInterceptor.java?rev=1372932&r1=1372931&r2=1372932&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapActionInInterceptor.java (original)
+++ cxf/branches/2.5.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapActionInInterceptor.java Tue Aug 14 15:45:16 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);
         }
     }