geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xuhaih...@apache.org
Subject svn commit: r1124524 - in /geronimo/bundles/trunk/axis2/src/main/java/org/apache/axis2: client/OperationClient.java transport/http/AbstractHTTPSender.java
Date Thu, 19 May 2011 02:56:30 GMT
Author: xuhaihong
Date: Thu May 19 02:56:30 2011
New Revision: 1124524

URL: http://svn.apache.org/viewvc?rev=1124524&view=rev
Log:
AXIS2-5039 SOAPAction Override, try the updated patch from Geronimo side

Modified:
    geronimo/bundles/trunk/axis2/src/main/java/org/apache/axis2/client/OperationClient.java
    geronimo/bundles/trunk/axis2/src/main/java/org/apache/axis2/transport/http/AbstractHTTPSender.java

Modified: geronimo/bundles/trunk/axis2/src/main/java/org/apache/axis2/client/OperationClient.java
URL: http://svn.apache.org/viewvc/geronimo/bundles/trunk/axis2/src/main/java/org/apache/axis2/client/OperationClient.java?rev=1124524&r1=1124523&r2=1124524&view=diff
==============================================================================
--- geronimo/bundles/trunk/axis2/src/main/java/org/apache/axis2/client/OperationClient.java
(original)
+++ geronimo/bundles/trunk/axis2/src/main/java/org/apache/axis2/client/OperationClient.java
Thu May 19 02:56:30 2011
@@ -281,8 +281,7 @@ public abstract class OperationClient {
     protected void prepareMessageContext(ConfigurationContext configurationContext,
                                          MessageContext mc)
             throws AxisFault {
-        // set options on the message context
-        if (options.getAction() != null || options.getAction().length() > 0) {
+        if (options.getAction() != null && options.getAction().length() > 0) {
             mc.setSoapAction(options.getAction());
         }
 

Modified: geronimo/bundles/trunk/axis2/src/main/java/org/apache/axis2/transport/http/AbstractHTTPSender.java
URL: http://svn.apache.org/viewvc/geronimo/bundles/trunk/axis2/src/main/java/org/apache/axis2/transport/http/AbstractHTTPSender.java?rev=1124524&r1=1124523&r2=1124524&view=diff
==============================================================================
--- geronimo/bundles/trunk/axis2/src/main/java/org/apache/axis2/transport/http/AbstractHTTPSender.java
(original)
+++ geronimo/bundles/trunk/axis2/src/main/java/org/apache/axis2/transport/http/AbstractHTTPSender.java
Thu May 19 02:56:30 2011
@@ -32,6 +32,7 @@ import org.apache.axis2.i18n.Messages;
 import org.apache.axis2.transport.MessageFormatter;
 import org.apache.axis2.transport.TransportUtils;
 import org.apache.axis2.transport.http.util.HTTPProxyConfigurationUtil;
+import org.apache.axis2.util.JavaUtils;
 import org.apache.axis2.wsdl.WSDLConstants;
 import org.apache.commons.httpclient.Credentials;
 import org.apache.commons.httpclient.Header;
@@ -50,6 +51,8 @@ import org.apache.commons.httpclient.Use
 import org.apache.commons.httpclient.auth.AuthPolicy;
 import org.apache.commons.httpclient.auth.AuthScope;
 import org.apache.commons.httpclient.params.HttpMethodParams;
+import org.apache.commons.httpclient.params.HttpConnectionManagerParams;
+import org.apache.commons.httpclient.params.HttpClientParams;
 import org.apache.commons.httpclient.protocol.Protocol;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -621,6 +624,7 @@ public abstract class AbstractHTTPSender
     public void addCustomHeaders(HttpMethod method, MessageContext msgContext) {
 
         boolean isCustomUserAgentSet = false;
+        boolean isSOAPActionSet = method.getRequestHeader(HTTPConstants.HEADER_SOAP_ACTION)
!= null;
         // set the custom headers, if available
         Object httpHeadersObj = msgContext.getProperty(HTTPConstants.HTTP_HEADERS);
         if (httpHeadersObj != null) {
@@ -633,6 +637,8 @@ public abstract class AbstractHTTPSender
                         isCustomUserAgentSet = true;
                     } else if (HTTPConstants.HEADER_CONTENT_LENGTH.equals(header.getName())
&& chunked) {
                         continue;
+                    } else if (HTTPConstants.HEADER_SOAP_ACTION.equals(header.getName())
&& isSOAPActionSet) {
+                        continue;
                     }
                     method.addRequestHeader(header);
                 }
@@ -648,6 +654,8 @@ public abstract class AbstractHTTPSender
                         isCustomUserAgentSet = true;
                     } else if (HTTPConstants.HEADER_CONTENT_LENGTH.equals(key) &&
chunked) {
                         continue;
+                    } else if (HTTPConstants.HEADER_SOAP_ACTION.equals(key) && isSOAPActionSet)
{
+                        continue;
                     }
                     method.addRequestHeader(key, value);
                 }



Mime
View raw message