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 2007/07/16 22:42:06 UTC

svn commit: r556730 - /webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/client/PropertyMigrator.java

Author: scheu
Date: Mon Jul 16 13:42:05 2007
New Revision: 556730

URL: http://svn.apache.org/viewvc?view=rev&rev=556730
Log:
Quick change to preserve the MTOM settings.
Also fixed a minor problem with the formatting of the file.

Modified:
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/client/PropertyMigrator.java

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/client/PropertyMigrator.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/client/PropertyMigrator.java?view=diff&rev=556730&r1=556729&r2=556730
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/client/PropertyMigrator.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/client/PropertyMigrator.java Mon Jul 16 13:42:05 2007
@@ -18,6 +18,7 @@
  */
 package org.apache.axis2.jaxws.client;
 
+import org.apache.axis2.Constants;
 import org.apache.axis2.jaxws.core.MEPContext;
 import org.apache.axis2.jaxws.core.MessageContext;
 import org.apache.axis2.jaxws.spi.migrator.ApplicationContextMigrator;
@@ -34,20 +35,20 @@
 	private static final Log log = LogFactory.getLog(PropertyMigrator.class);
     public void migratePropertiesFromMessageContext(Map<String, Object> userContext,
                                                     MessageContext messageContext) {
-       
-    	if(log.isDebugEnabled()){
-    		log.debug("Starting migratePropertyFromMessageContext");
-    	}
-    	MEPContext mepContext =messageContext.getMEPContext();
-    	if(mepContext!=null){
-    		if(log.isDebugEnabled()){
-    			log.debug("Reading ApplicationScopedProperties from MEPContext");
-    		}
-    		userContext.putAll(mepContext.getApplicationScopedProperties());
-    	}
-    	if(log.isDebugEnabled()){
-    		log.debug("migratePropertyFromMessageContext Complete");
-    	}
+
+        if (log.isDebugEnabled()) {
+            log.debug("Starting migratePropertyFromMessageContext");
+        }
+        MEPContext mepContext = messageContext.getMEPContext();
+        if (mepContext != null) {
+            if (log.isDebugEnabled()) {
+                log.debug("Reading ApplicationScopedProperties from MEPContext");
+            }
+            userContext.putAll(mepContext.getApplicationScopedProperties());
+        }
+        if (log.isDebugEnabled()) {
+            log.debug("migratePropertyFromMessageContext Complete");
+        }
     }
 
     public void migratePropertiesToMessageContext(Map<String, Object> userContext,
@@ -57,6 +58,12 @@
         if (userContext != null) {
             for (String key: userContext.keySet()) {
                 Object value = userContext.get(key);
+                // Make sure mtom state in the user context, the message context, 
+                // the MEP context are the same.
+                if(key.equalsIgnoreCase(Constants.Configuration.ENABLE_MTOM)){
+                    value = messageContext.getMessage().isMTOMEnabled();
+                    messageContext.getMEPContext().put(key, value);
+                }
                 messageContext.setProperty(key, value);
             }
         }



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