Return-Path: X-Original-To: apmail-cxf-commits-archive@www.apache.org Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C89E8DEDC for ; Mon, 13 Aug 2012 19:08:17 +0000 (UTC) Received: (qmail 37306 invoked by uid 500); 13 Aug 2012 19:08:17 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 37263 invoked by uid 500); 13 Aug 2012 19:08:17 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 37256 invoked by uid 99); 13 Aug 2012 19:08:17 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Aug 2012 19:08:17 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Aug 2012 19:08:15 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 217F423888EA; Mon, 13 Aug 2012 19:07:31 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1372554 - /cxf/branches/2.6.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapActionInInterceptor.java Date: Mon, 13 Aug 2012 19:07:31 -0000 To: commits@cxf.apache.org From: dkulp@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120813190731.217F423888EA@eris.apache.org> 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); } }