You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by sc...@apache.org on 2009/12/19 00:05:01 UTC
svn commit: r892394 -
/webservices/axis2/trunk/java/modules/transport/http/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java
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");
}