cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1372552 - /cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapActionInInterceptor.java
Date Mon, 13 Aug 2012 19:00:44 GMT
Author: dkulp
Date: Mon Aug 13 19:00:44 2012
New Revision: 1372552

URL: http://svn.apache.org/viewvc?rev=1372552&view=rev
Log:
The wsam:Action needs to also be checked as that can override the soapAction stuff in the
WSDL.

Modified:
    cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapActionInInterceptor.java

Modified: cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapActionInInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapActionInInterceptor.java?rev=1372552&r1=1372551&r2=1372552&view=diff
==============================================================================
--- cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapActionInInterceptor.java
(original)
+++ cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapActionInInterceptor.java
Mon Aug 13 19:00:44 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);
         }
     }



Mime
View raw message