axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ngalla...@apache.org
Subject svn commit: r639663 - /webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/BindingProvider.java
Date Fri, 21 Mar 2008 15:10:43 GMT
Author: ngallardo
Date: Fri Mar 21 08:10:23 2008
New Revision: 639663

URL: http://svn.apache.org/viewvc?rev=639663&view=rev
Log:
AXIS2-3646

Fixing MTOM enablement on dynamic ports.

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

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/BindingProvider.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/BindingProvider.java?rev=639663&r1=639662&r2=639663&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/BindingProvider.java
(original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/BindingProvider.java
Fri Mar 21 08:10:23 2008
@@ -109,7 +109,15 @@
 
         // See if the metadata from creating the service indicates that MTOM should be enabled
         if (binding instanceof SOAPBinding) {
+            // MTOM can be enabled either at the ServiceDescription level (via the WSDL binding
type) or
+            // at the EndpointDescription level via the binding type used to create a Dispatch.
             boolean enableMTOMFromMetadata = endpointDesc.getServiceDescription().isMTOMEnabled(serviceDelegate);
+            if (!enableMTOMFromMetadata) {
+                String bindingType = endpointDesc.getClientBindingID();
+                enableMTOMFromMetadata = (bindingType.equals(SOAPBinding.SOAP11HTTP_MTOM_BINDING)
|| 
+                                          bindingType.equals(SOAPBinding.SOAP12HTTP_MTOM_BINDING));
+            }
+            
             if (enableMTOMFromMetadata) {
                 ((SOAPBinding) binding).setMTOMEnabled(true);
             }



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