Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 62550 invoked from network); 18 Dec 2009 23:05:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 18 Dec 2009 23:05:29 -0000 Received: (qmail 31264 invoked by uid 500); 18 Dec 2009 23:05:29 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 31109 invoked by uid 500); 18 Dec 2009 23:05:29 -0000 Mailing-List: contact axis-cvs-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-cvs@ws.apache.org Received: (qmail 31100 invoked by uid 500); 18 Dec 2009 23:05:29 -0000 Delivered-To: apmail-ws-axis2-cvs@ws.apache.org Received: (qmail 31097 invoked by uid 99); 18 Dec 2009 23:05:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Dec 2009 23:05:29 +0000 X-ASF-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00 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; Fri, 18 Dec 2009 23:05:22 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 3A8A223889C5; Fri, 18 Dec 2009 23:05:02 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r892394 - /webservices/axis2/trunk/java/modules/transport/http/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java Date: Fri, 18 Dec 2009 23:05:01 -0000 To: axis2-cvs@ws.apache.org From: scheu@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20091218230502.3A8A223889C5@eris.apache.org> Author: scheu Date: Fri Dec 18 23:05:00 2009 New Revision: 892394 URL: http://svn.apache.org/viewvc?rev=892394&view=rev Log: AXIS2-4264 Correction Contributor:Rich Scheuerle Added a more comprehensive check for generated soap actions. Modified: webservices/axis2/trunk/java/modules/transport/http/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java Modified: webservices/axis2/trunk/java/modules/transport/http/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/transport/http/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java?rev=892394&r1=892393&r2=892394&view=diff ============================================================================== --- webservices/axis2/trunk/java/modules/transport/http/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java (original) +++ webservices/axis2/trunk/java/modules/transport/http/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java Fri Dec 18 23:05:00 2009 @@ -413,6 +413,40 @@ } } + /** + * @param actionString + * @return true if the specified String represents a generated (anonymous name) + */ + public static boolean isGeneratedName(String actionString) { + if (actionString == null) { + return false; + } + + // Different releases may have different constructed names or + // namespaces or quames. However all equal or end with the following + // sequences + if (actionString.indexOf("anon") >= 0) { + if (actionString.equals("anonOutInOp") || + actionString.endsWith(":anonOutInOp") || + actionString.endsWith("/anonOutInOp") || + actionString.endsWith("}anonOutInOp") || + + actionString.equals("anonOutonlyOp") || + actionString.endsWith(":anonOutonlyOp") || + actionString.endsWith("/anonOutonlyOp") || + actionString.endsWith("}anonOutonlyOp") || + + actionString.equals("anonRobustOp") || + actionString.endsWith(":anonRobustOp") || + actionString.endsWith("/anonRobustOp") || + actionString.endsWith("}anonRobustOp") ) { + return true; + } + } + return false; + } + + private static String findSOAPAction(MessageContext messageContext) { String soapActionString = null; @@ -433,13 +467,7 @@ log.debug("SOAP Action from messageContext : (" + soapActionString + ")"); } - if (soapActionString != null && - (soapActionString.equals("urn:anonOutInOp") || - soapActionString.equals("anonOutInOp") || - soapActionString.equals("urn:anonOutonlyOp") || - soapActionString.equals("anonOutonlyOp") || - soapActionString.equals("urn:anonRobustOp") || - soapActionString.equals("anonRobustOp"))) { + if (isGeneratedName(soapActionString)) { if (log.isDebugEnabled()) { log.debug("Will not use SOAP Action because (" + soapActionString + ") was auto-generated"); } @@ -460,9 +488,7 @@ if (log.isDebugEnabled()) { log.debug("SOAP Action from AxisOperation was : (" + axisOpSOAPAction + ")"); } - if (ServiceClient.ANON_OUT_ONLY_OP.equals(axisOpSOAPAction) - || (ServiceClient.ANON_OUT_IN_OP.equals(axisOpSOAPAction)) - || (ServiceClient.ANON_ROBUST_OUT_ONLY_OP.equals(axisOpSOAPAction))) { + if (isGeneratedName(axisOpSOAPAction)) { if (log.isDebugEnabled()) { log.debug("Will not override SOAP Action because (" + axisOpSOAPAction + ") in AxisOperation was auto-generated"); }