axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thil...@apache.org
Subject svn commit: r553444 - in /webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2: builder/MTOMBuilder.java transport/http/HTTPTransportUtils.java
Date Thu, 05 Jul 2007 10:16:20 GMT
Author: thilina
Date: Thu Jul  5 03:16:11 2007
New Revision: 553444

URL: http://svn.apache.org/viewvc?view=rev&rev=553444
Log:
Fixing  AXIS2-2874...
Now users can use "optional" value for enableMTOM parameter...

Modified:
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/builder/MTOMBuilder.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/HTTPTransportUtils.java

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/builder/MTOMBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/builder/MTOMBuilder.java?view=diff&rev=553444&r1=553443&r2=553444
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/builder/MTOMBuilder.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/builder/MTOMBuilder.java
Thu Jul  5 03:16:11 2007
@@ -59,6 +59,7 @@
                     .validateSOAPVersion(BuilderUtil.getEnvelopeNamespace(contentType), envelope);
             BuilderUtil.validateCharSetEncoding(charSetEncoding, builder.getDocument()
                     .getCharsetEncoding(), envelope.getNamespace().getNamespaceURI());
+            messageContext.setDoingMTOM(true);
             return envelope;
         } catch (IOException e) {
             throw AxisFault.makeFault(e);

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/HTTPTransportUtils.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/HTTPTransportUtils.java?view=diff&rev=553444&r1=553443&r2=553444
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/HTTPTransportUtils.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/HTTPTransportUtils.java
Thu Jul  5 03:16:11 2007
@@ -110,14 +110,21 @@
 //        }
 
         boolean enableMTOM = false;
+        Object enableMTOMObject=null;
         Parameter parameter = msgContext.getParameter(Constants.Configuration.ENABLE_MTOM);
         if (parameter != null) {
-            enableMTOM = JavaUtils.isTrueExplicitly(
-                    parameter.getValue());
+            enableMTOMObject = parameter.getValue();
         }
         Object property = msgContext.getProperty(Constants.Configuration.ENABLE_MTOM);
         if (property != null) {
-            enableMTOM = JavaUtils.isTrueExplicitly(property);
+            enableMTOMObject = property;
+        }
+        enableMTOM = JavaUtils.isTrueExplicitly(enableMTOMObject);
+        //Handle the optional value for enableMTOM
+        if(!enableMTOM && msgContext.isDoingMTOM() && (enableMTOMObject instanceof
String)){
+            if (((String)enableMTOMObject).equalsIgnoreCase(Constants.VALUE_OPTIONAL)){
+                enableMTOM=true;
+            }
         }
         return enableMTOM;
     }



---------------------------------------------------------------------
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