axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thil...@apache.org
Subject svn commit: r551888 - /webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java
Date Fri, 29 Jun 2007 13:27:00 GMT
Author: thilina
Date: Fri Jun 29 06:26:59 2007
New Revision: 551888

URL: http://svn.apache.org/viewvc?view=rev&rev=551888
Log:
optimising the SOAP12 action omitting logic, added a way to overide the OmitSOAP12Action parameter
prorgamatically using the disableSoapAction property, Fixed some typos

Modified:
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java?view=diff&rev=551888&r1=551887&r2=551888
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java
Fri Jun 29 06:26:59 2007
@@ -158,23 +158,27 @@
             TransportOutDescription transportOut = msgContext.getConfigurationContext().
                     getAxisConfiguration().getTransportOut(Constants.TRANSPORT_HTTP);
 
-            //if a parameter hs set been set, we will omit the SOAP action for SOAP 1.2 
+            //if a parameter has set been set, we will omit the SOAP action for SOAP 1.2

             if (transportOut != null) {
-                Parameter param = transportOut.getParameter(HTTPConstants.OMIT_SOAP_12_ACTION);
-                Object value = null;
-                if (param != null) {
-                    value = param.getValue();
-                }
+                if (!msgContext.isSOAP11()) {
+                    Parameter param = transportOut.getParameter(HTTPConstants.OMIT_SOAP_12_ACTION);
+                    Object parameterValue = null;
+                    if (param != null) {
+                        parameterValue = param.getValue();
+                    }
 
-                if (value != null && JavaUtils.isTrueExplicitly(value)) {
-                    if (!msgContext.isSOAP11()) {
-                        msgContext.setProperty(Constants.Configuration.DISABLE_SOAP_ACTION,
-                                               Boolean.TRUE);
+                    if (parameterValue != null && JavaUtils.isTrueExplicitly(parameterValue))
{
+                        //Check whether user has already overridden this.
+                        Object propertyValue = msgContext.getProperty(Constants.Configuration.DISABLE_SOAP_ACTION);
+                        if (propertyValue == null | !JavaUtils.isFalseExplicitly(propertyValue))
{
+                            msgContext.setProperty(Constants.Configuration.DISABLE_SOAP_ACTION,
+                                    Boolean.TRUE);
+                        }
                     }
                 }
             }
 
-            // Trasnport URL can be different from the WSA-To. So processing
+            // Transport URL can be different from the WSA-To. So processing
             // that now.
             EndpointReference epr = null;
             String transportURL = (String) msgContext
@@ -187,7 +191,7 @@
                 epr = msgContext.getTo();
             }
 
-            // Check for the REST behaviour, if you desire rest beahaviour
+            // Check for the REST behavior, if you desire rest behavior
             // put a <parameter name="doREST" value="true"/> at the
             // server.xml/client.xml file
             // ######################################################
@@ -243,7 +247,7 @@
         OutputStream out = (OutputStream) msgContext
                 .getProperty(MessageContext.TRANSPORT_OUT);
 
-        // I Don't thinik we need this check.. Content type needs to be set in
+        // I Don't think we need this check.. Content type needs to be set in
         // any case. (thilina)
         // if (msgContext.isServerSide()) {
         OutTransportInfo transportInfo = (OutTransportInfo) msgContext



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message