geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jgenen...@apache.org
Subject svn commit: r512990 - in /geronimo/server/trunk/modules: geronimo-axis2-builder/src/main/java/org/apache/geronimo/axis2/builder/ geronimo-cxf-builder/src/main/java/org/apache/geronimo/cxf/builder/ geronimo-cxf/src/main/java/org/apache/geronimo/cxf/ ger...
Date Wed, 28 Feb 2007 21:36:35 GMT
Author: jgenender
Date: Wed Feb 28 13:36:34 2007
New Revision: 512990

URL: http://svn.apache.org/viewvc?view=rev&rev=512990
Log:
GERONIMO-2882 patch committed

Added:
    geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/GeronimoJaxWsImplementorInfo.java
Modified:
    geronimo/server/trunk/modules/geronimo-axis2-builder/src/main/java/org/apache/geronimo/axis2/builder/Axis2Builder.java
    geronimo/server/trunk/modules/geronimo-axis2-builder/src/main/java/org/apache/geronimo/axis2/builder/Axis2ServiceRefBuilder.java
    geronimo/server/trunk/modules/geronimo-cxf-builder/src/main/java/org/apache/geronimo/cxf/builder/CXFBuilder.java
    geronimo/server/trunk/modules/geronimo-cxf-builder/src/main/java/org/apache/geronimo/cxf/builder/CXFServiceRefBuilder.java
    geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/CXFEndpoint.java
    geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/ejb/EJBEndpoint.java
    geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/pojo/POJOEndpoint.java
    geronimo/server/trunk/modules/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/EndpointInfoBuilder.java
    geronimo/server/trunk/modules/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/JAXWSServiceRefBuilder.java
    geronimo/server/trunk/modules/geronimo-jaxws/src/main/java/org/apache/geronimo/jaxws/client/EndpointInfo.java
    geronimo/server/trunk/modules/geronimo-jaxws/src/main/java/org/apache/geronimo/jaxws/client/PortMethodInterceptor.java

Modified: geronimo/server/trunk/modules/geronimo-axis2-builder/src/main/java/org/apache/geronimo/axis2/builder/Axis2Builder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-axis2-builder/src/main/java/org/apache/geronimo/axis2/builder/Axis2Builder.java?view=diff&rev=512990&r1=512989&r2=512990
==============================================================================
--- geronimo/server/trunk/modules/geronimo-axis2-builder/src/main/java/org/apache/geronimo/axis2/builder/Axis2Builder.java
(original)
+++ geronimo/server/trunk/modules/geronimo-axis2-builder/src/main/java/org/apache/geronimo/axis2/builder/Axis2Builder.java
Wed Feb 28 13:36:34 2007
@@ -59,6 +59,7 @@
 import org.apache.geronimo.jaxws.client.EndpointInfo;
 import org.apache.geronimo.kernel.repository.Environment;
 import org.apache.geronimo.xbeans.geronimo.naming.GerServiceRefType;
+import org.apache.geronimo.xbeans.javaee.PortComponentRefType;
 import org.apache.geronimo.xbeans.javaee.ServiceRefHandlerChainsType;
 
 public class Axis2Builder extends JAXWSServiceBuilder {
@@ -207,7 +208,7 @@
                                 Class serviceReference,
                                 URI wsdlURI,
                                 QName serviceQName,
-                                Map<Class, String> portComponentRefMap,
+                                Map<Class, PortComponentRefType> portComponentRefMap,
                                 ServiceRefHandlerChainsType handlerChains,
                                 GerServiceRefType serviceRefType,
                                 Module module,

Modified: geronimo/server/trunk/modules/geronimo-axis2-builder/src/main/java/org/apache/geronimo/axis2/builder/Axis2ServiceRefBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-axis2-builder/src/main/java/org/apache/geronimo/axis2/builder/Axis2ServiceRefBuilder.java?view=diff&rev=512990&r1=512989&r2=512990
==============================================================================
--- geronimo/server/trunk/modules/geronimo-axis2-builder/src/main/java/org/apache/geronimo/axis2/builder/Axis2ServiceRefBuilder.java
(original)
+++ geronimo/server/trunk/modules/geronimo-axis2-builder/src/main/java/org/apache/geronimo/axis2/builder/Axis2ServiceRefBuilder.java
Wed Feb 28 13:36:34 2007
@@ -2,6 +2,7 @@
 
 import org.apache.geronimo.jaxws.builder.JAXWSServiceRefBuilder;
 import org.apache.geronimo.kernel.repository.Environment;
+import org.apache.geronimo.xbeans.javaee.PortComponentRefType;
 import org.apache.geronimo.xbeans.javaee.ServiceRefType;
 import org.apache.geronimo.xbeans.geronimo.naming.GerServiceRefType;
 import org.apache.geronimo.j2ee.deployment.Module;
@@ -29,7 +30,7 @@
     public Object createService(ServiceRefType serviceRef, GerServiceRefType gerServiceRef,
                                 Module module, ClassLoader cl, Class serviceInterfaceClass,
                                 QName serviceQName, URI wsdlURI, Class serviceReferenceType,
-                                Map<Class, String> portComponentRefMap) throws DeploymentException
{
+                                Map<Class, PortComponentRefType> portComponentRefMap)
throws DeploymentException {
         return this.axis2Builder.createService(serviceInterfaceClass, serviceReferenceType,
wsdlURI,
                                              serviceQName, portComponentRefMap, serviceRef.getHandlerChains(),
                                              gerServiceRef, module, cl);

Modified: geronimo/server/trunk/modules/geronimo-cxf-builder/src/main/java/org/apache/geronimo/cxf/builder/CXFBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-cxf-builder/src/main/java/org/apache/geronimo/cxf/builder/CXFBuilder.java?view=diff&rev=512990&r1=512989&r2=512990
==============================================================================
--- geronimo/server/trunk/modules/geronimo-cxf-builder/src/main/java/org/apache/geronimo/cxf/builder/CXFBuilder.java
(original)
+++ geronimo/server/trunk/modules/geronimo-cxf-builder/src/main/java/org/apache/geronimo/cxf/builder/CXFBuilder.java
Wed Feb 28 13:36:34 2007
@@ -55,6 +55,7 @@
 import org.apache.geronimo.jaxws.client.EndpointInfo;
 import org.apache.geronimo.kernel.repository.Environment;
 import org.apache.geronimo.xbeans.geronimo.naming.GerServiceRefType;
+import org.apache.geronimo.xbeans.javaee.PortComponentRefType;
 import org.apache.geronimo.xbeans.javaee.ServiceRefHandlerChainsType;
 
 public class CXFBuilder extends JAXWSServiceBuilder {
@@ -176,7 +177,7 @@
                                 Class serviceReference,
                                 URI wsdlURI,
                                 QName serviceQName,
-                                Map<Class, String> portComponentRefMap,
+                                Map<Class, PortComponentRefType> portComponentRefMap,
                                 ServiceRefHandlerChainsType handlerChains,
                                 GerServiceRefType serviceRefType,
                                 Module module,

Modified: geronimo/server/trunk/modules/geronimo-cxf-builder/src/main/java/org/apache/geronimo/cxf/builder/CXFServiceRefBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-cxf-builder/src/main/java/org/apache/geronimo/cxf/builder/CXFServiceRefBuilder.java?view=diff&rev=512990&r1=512989&r2=512990
==============================================================================
--- geronimo/server/trunk/modules/geronimo-cxf-builder/src/main/java/org/apache/geronimo/cxf/builder/CXFServiceRefBuilder.java
(original)
+++ geronimo/server/trunk/modules/geronimo-cxf-builder/src/main/java/org/apache/geronimo/cxf/builder/CXFServiceRefBuilder.java
Wed Feb 28 13:36:34 2007
@@ -31,6 +31,7 @@
 import org.apache.geronimo.kernel.repository.Environment;
 import org.apache.geronimo.naming.deployment.ServiceRefBuilder;
 import org.apache.geronimo.xbeans.geronimo.naming.GerServiceRefType;
+import org.apache.geronimo.xbeans.javaee.PortComponentRefType;
 import org.apache.geronimo.xbeans.javaee.ServiceRefType;
 
 public class CXFServiceRefBuilder extends JAXWSServiceRefBuilder {
@@ -47,7 +48,7 @@
     public Object createService(ServiceRefType serviceRef, GerServiceRefType gerServiceRef,

                                 Module module, ClassLoader cl, Class serviceInterfaceClass,

                                 QName serviceQName, URI wsdlURI, Class serviceReferenceType,

-                                Map<Class, String> portComponentRefMap) throws DeploymentException
{   
+                                Map<Class, PortComponentRefType> portComponentRefMap)
throws DeploymentException {   
         return this.cxfBuilder.createService(serviceInterfaceClass, serviceReferenceType,
wsdlURI, 
                                              serviceQName, portComponentRefMap, serviceRef.getHandlerChains(),
                                              gerServiceRef, module, cl);

Modified: geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/CXFEndpoint.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/CXFEndpoint.java?view=diff&rev=512990&r1=512989&r2=512990
==============================================================================
--- geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/CXFEndpoint.java
(original)
+++ geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/CXFEndpoint.java
Wed Feb 28 13:36:34 2007
@@ -27,6 +27,7 @@
 import javax.xml.transform.Source;
 import javax.xml.ws.Binding;
 import javax.xml.ws.Endpoint;
+import javax.xml.ws.soap.SOAPBinding;
 
 import org.apache.cxf.Bus;
 import org.apache.cxf.endpoint.Server;
@@ -37,6 +38,7 @@
 import org.apache.cxf.jaxws.support.JaxWsImplementorInfo;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.service.Service;
+import org.apache.geronimo.jaxws.PortInfo;
 
 public abstract class CXFEndpoint extends Endpoint {
 
@@ -52,11 +54,12 @@
 
     protected AbstractJaxWsServiceFactoryBean serviceFactory;
 
-    protected String bindingURI;
+    protected PortInfo portInfo;
 
     public CXFEndpoint(Bus bus, Object implementor) {
         this.bus = bus;
         this.implementor = implementor;
+        this.portInfo = (PortInfo) bus.getExtension(PortInfo.class);       
     }
   
     protected URL getWsdlURL(URL configurationBaseUrl, String wsdlFile) {
@@ -160,6 +163,10 @@
 
         org.apache.cxf.endpoint.Endpoint endpoint = getEndpoint();
 
+        if (getBinding() instanceof SOAPBinding) {
+            ((SOAPBinding)getBinding()).setMTOMEnabled(this.portInfo.isMTOMEnabled());
+        }
+        
         if (endpoint.getEnableSchemaValidation()) {
             endpoint.put(Message.SCHEMA_VALIDATION_ENABLED, 
                          endpoint.getEnableSchemaValidation());

Added: geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/GeronimoJaxWsImplementorInfo.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/GeronimoJaxWsImplementorInfo.java?view=auto&rev=512990
==============================================================================
--- geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/GeronimoJaxWsImplementorInfo.java
(added)
+++ geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/GeronimoJaxWsImplementorInfo.java
Wed Feb 28 13:36:34 2007
@@ -0,0 +1,38 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.cxf;
+
+import org.apache.cxf.jaxws.support.JaxWsImplementorInfo;
+
+public class GeronimoJaxWsImplementorInfo extends JaxWsImplementorInfo {
+
+    private String bindingURI;
+
+    public GeronimoJaxWsImplementorInfo(Class clazz, String bindingURI) {
+        super(clazz);
+        this.bindingURI = bindingURI;
+    }
+    
+    public String getBindingType() {
+        if (this.bindingURI != null) {
+            return this.bindingURI;
+        } else {
+            return super.getBindingType();
+        }
+    }
+   
+}

Modified: geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/ejb/EJBEndpoint.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/ejb/EJBEndpoint.java?view=diff&rev=512990&r1=512989&r2=512990
==============================================================================
--- geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/ejb/EJBEndpoint.java
(original)
+++ geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/ejb/EJBEndpoint.java
Wed Feb 28 13:36:34 2007
@@ -20,31 +20,27 @@
 
 import java.net.URL;
 
-import javax.xml.ws.WebServiceException;
-
 import org.apache.cxf.Bus;
-import org.apache.cxf.jaxws.support.JaxWsImplementorInfo;
 import org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean;
 import org.apache.cxf.message.Message;
 import org.apache.geronimo.cxf.CXFEndpoint;
 import org.apache.geronimo.cxf.CXFServiceConfiguration;
+import org.apache.geronimo.cxf.GeronimoJaxWsImplementorInfo;
 import org.apache.geronimo.jaxws.JAXWSUtils;
-import org.apache.geronimo.jaxws.PortInfo;
 import org.apache.openejb.DeploymentInfo;
 
 public class EJBEndpoint extends CXFEndpoint {
 
-    private PortInfo portInfo;
-
     public EJBEndpoint(Bus bus,
                        URL configurationBaseUrl,
                        Class instance) {
         super(bus, instance);
-
-        this.portInfo = (PortInfo) bus.getExtension(PortInfo.class);
-        this.bindingURI = JAXWSUtils.getBindingURI(this.portInfo.getProtocolBinding());
-        
-        implInfo = new JaxWsImplementorInfo( (Class)implementor );
+                
+        String bindingURI = null;
+        if (this.portInfo.getProtocolBinding() != null) {
+            bindingURI = JAXWSUtils.getBindingURI(this.portInfo.getProtocolBinding());
+        }
+        implInfo = new GeronimoJaxWsImplementorInfo((Class)implementor, bindingURI);
 
         serviceFactory = new JaxWsServiceFactoryBean(implInfo);       
         serviceFactory.setBus(bus);

Modified: geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/pojo/POJOEndpoint.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/pojo/POJOEndpoint.java?view=diff&rev=512990&r1=512989&r2=512990
==============================================================================
--- geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/pojo/POJOEndpoint.java
(original)
+++ geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/pojo/POJOEndpoint.java
Wed Feb 28 13:36:34 2007
@@ -28,36 +28,34 @@
 import org.apache.cxf.jaxws.JAXWSMethodInvoker;
 import org.apache.cxf.jaxws.handler.PortInfoImpl;
 import org.apache.cxf.jaxws.javaee.HandlerChainsType;
-import org.apache.cxf.jaxws.support.JaxWsImplementorInfo;
 import org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean;
 import org.apache.cxf.message.Message;
 import org.apache.geronimo.cxf.CXFEndpoint;
 import org.apache.geronimo.cxf.CXFHandlerResolver;
 import org.apache.geronimo.cxf.CXFServiceConfiguration;
+import org.apache.geronimo.cxf.GeronimoJaxWsImplementorInfo;
 import org.apache.geronimo.jaxws.JAXWSAnnotationProcessor;
 import org.apache.geronimo.jaxws.JAXWSUtils;
 import org.apache.geronimo.jaxws.JNDIResolver;
-import org.apache.geronimo.jaxws.PortInfo;
 import org.apache.geronimo.jaxws.annotations.AnnotationException;
 import org.apache.geronimo.jaxws.annotations.AnnotationProcessor;
 
 public class POJOEndpoint extends CXFEndpoint {
 
-    private PortInfo portInfo;
-
     private AnnotationProcessor annotationProcessor;
 
     public POJOEndpoint(Bus bus, URL configurationBaseUrl, Object instance) {
         super(bus, instance);
-
-        this.portInfo = (PortInfo) bus.getExtension(PortInfo.class);
-        this.bindingURI = JAXWSUtils.getBindingURI(this.portInfo.getProtocolBinding());
         
-        implInfo = new JaxWsImplementorInfo(implementor.getClass());
+        String bindingURI = null;
+        if (this.portInfo.getProtocolBinding() != null) {
+            bindingURI = JAXWSUtils.getBindingURI(this.portInfo.getProtocolBinding());
+        }
+        implInfo = new GeronimoJaxWsImplementorInfo(implementor.getClass(), bindingURI);
 
         serviceFactory = new JaxWsServiceFactoryBean(implInfo);        
         serviceFactory.setBus(bus);
-
+                
         /*
          * TODO: The WSDL processing needs to be improved
          */
@@ -111,9 +109,10 @@
                                    this.implementor.getClass(),
                                    handlerChains, 
                                    this.annotationProcessor);
-                
-        PortInfoImpl portInfo = 
-            new PortInfoImpl(this.bindingURI, serviceFactory.getEndpointName(), service.getName());
+                      
+        PortInfoImpl portInfo = new PortInfoImpl(implInfo.getBindingType(), 
+                                                 serviceFactory.getEndpointName(),
+                                                 service.getName());
         
         List<Handler> chain = handlerResolver.getHandlerChain(portInfo);
 

Modified: geronimo/server/trunk/modules/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/EndpointInfoBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/EndpointInfoBuilder.java?view=diff&rev=512990&r1=512989&r2=512990
==============================================================================
--- geronimo/server/trunk/modules/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/EndpointInfoBuilder.java
(original)
+++ geronimo/server/trunk/modules/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/EndpointInfoBuilder.java
Wed Feb 28 13:36:34 2007
@@ -51,6 +51,7 @@
 import org.apache.geronimo.jaxws.client.EndpointInfo;
 import org.apache.geronimo.xbeans.geronimo.naming.GerPortType;
 import org.apache.geronimo.xbeans.geronimo.naming.GerServiceRefType;
+import org.apache.geronimo.xbeans.javaee.PortComponentRefType;
 import org.xml.sax.InputSource;
 
 public class EndpointInfoBuilder {
@@ -69,11 +70,11 @@
 
     private Map<Object, EndpointInfo> portInfoMap = new HashMap<Object, EndpointInfo>();
 
-    private Map<Class, String> portComponentRefMap;
+    private Map<Class, PortComponentRefType> portComponentRefMap;
 
     public EndpointInfoBuilder(Class serviceClass,
                                GerServiceRefType serviceRefType,
-                               Map<Class, String> portComponentRefMap,
+                               Map<Class, PortComponentRefType> portComponentRefMap,
                                JarFile moduleFile,
                                URI wsdlURI,
                                QName serviceQName) {
@@ -214,7 +215,9 @@
                     throw new DeploymentException("No portType for binding: " + binding.getQName());
                 }
 
-                EndpointInfo info = new EndpointInfo(location, credentialsName);
+                boolean mtomEnabled = isMTOMEnabled(portType.getQName());
+                
+                EndpointInfo info = new EndpointInfo(location, credentialsName, mtomEnabled);
                 this.portInfoMap.put(portName, info);
                 // prefer first binding listed in wsdl
                 if (!this.portInfoMap.containsKey(portType.getQName())) {
@@ -308,6 +311,31 @@
                 throw new DeploymentException("No portType found in WSDL for SEI: " + sei.getName());
             }            
         }        
+    }
+    
+    private boolean isMTOMEnabled(QName portType) {
+        boolean mtomEnabled = false;
+        PortComponentRefType portRef = getPortComponentRef(portType);
+        if (portRef != null && portRef.isSetEnableMtom()) {
+            mtomEnabled = portRef.getEnableMtom().getBooleanValue();
+        }
+        return mtomEnabled;
+    }
+    
+    private PortComponentRefType getPortComponentRef(QName portType) {
+        if (this.portComponentRefMap == null) {
+            return null;
+        }
+        for (Class sei : this.portComponentRefMap.keySet()) {
+            QName seiPortType = JAXWSUtils.getPortType(sei);
+            if (seiPortType == null) {
+                continue;
+            }
+            if (portType.equals(seiPortType)) {
+                return this.portComponentRefMap.get(sei);
+            }        
+        }
+        return null;
     }
     
     private class JarWSDLLocator implements WSDLLocator {

Modified: geronimo/server/trunk/modules/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/JAXWSServiceRefBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/JAXWSServiceRefBuilder.java?view=diff&rev=512990&r1=512989&r2=512990
==============================================================================
--- geronimo/server/trunk/modules/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/JAXWSServiceRefBuilder.java
(original)
+++ geronimo/server/trunk/modules/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/JAXWSServiceRefBuilder.java
Wed Feb 28 13:36:34 2007
@@ -140,17 +140,17 @@
             }
         }
                        
-        Map<Class, String> portComponentRefMap = new HashMap<Class, String>();
+        Map<Class, PortComponentRefType> portComponentRefMap = new HashMap<Class,
PortComponentRefType>();
         PortComponentRefType[] portComponentRefs = serviceRef.getPortComponentRefArray();
         if (portComponentRefs != null) {
             for (int j = 0; j < portComponentRefs.length; j++) {
                 PortComponentRefType portComponentRef = portComponentRefs[j];
                 String serviceEndpointInterfaceType = getStringValue(portComponentRef.getServiceEndpointInterface());
                 Class serviceEndpointClass = loadClass(serviceEndpointInterfaceType, cl,
"service endpoint");
+                
                 // TODO: check if it is annotated?
-                String portComponentLink = getStringValue(portComponentRef.getPortComponentLink());
                 
-                portComponentRefMap.put(serviceEndpointClass, portComponentLink);
+                portComponentRefMap.put(serviceEndpointClass, portComponentRef);
             }
         }
         
@@ -163,7 +163,7 @@
     public abstract Object createService(ServiceRefType serviceRef, GerServiceRefType gerServiceRef,

                                          Module module, ClassLoader cl, Class serviceInterfaceClass,

                                          QName serviceQName, URI wsdlURI, Class serviceReferenceType,

-                                         Map<Class, String> portComponentRefMap) throws
DeploymentException;
+                                         Map<Class, PortComponentRefType> portComponentRefMap)
throws DeploymentException;
        
     private static Map mapServiceRefs(XmlObject[] refs) {
         Map refMap = new HashMap();

Modified: geronimo/server/trunk/modules/geronimo-jaxws/src/main/java/org/apache/geronimo/jaxws/client/EndpointInfo.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-jaxws/src/main/java/org/apache/geronimo/jaxws/client/EndpointInfo.java?view=diff&rev=512990&r1=512989&r2=512990
==============================================================================
--- geronimo/server/trunk/modules/geronimo-jaxws/src/main/java/org/apache/geronimo/jaxws/client/EndpointInfo.java
(original)
+++ geronimo/server/trunk/modules/geronimo-jaxws/src/main/java/org/apache/geronimo/jaxws/client/EndpointInfo.java
Wed Feb 28 13:36:34 2007
@@ -23,12 +23,18 @@
 
     private URL location;
     private String credentialsName;
+    private boolean mtomEnabled;
     
-    public EndpointInfo(URL location, String credentialsName) {
+    public EndpointInfo(URL location, String credentialsName, boolean mtomEnabled) {
         this.location = location;
-        this.credentialsName = credentialsName;        
+        this.credentialsName = credentialsName;  
+        this.mtomEnabled = mtomEnabled;        
     }
 
+    public boolean isMTOMEnabled() {
+        return this.mtomEnabled;
+    }
+    
     public URL getLocation() {
         return this.location;
     }
@@ -38,6 +44,6 @@
     }
     
     public String toString() {
-        return this.location + " " + this.credentialsName;
+        return this.location + " " + this.credentialsName + " " + this.mtomEnabled;
     }
 }

Modified: geronimo/server/trunk/modules/geronimo-jaxws/src/main/java/org/apache/geronimo/jaxws/client/PortMethodInterceptor.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-jaxws/src/main/java/org/apache/geronimo/jaxws/client/PortMethodInterceptor.java?view=diff&rev=512990&r1=512989&r2=512990
==============================================================================
--- geronimo/server/trunk/modules/geronimo-jaxws/src/main/java/org/apache/geronimo/jaxws/client/PortMethodInterceptor.java
(original)
+++ geronimo/server/trunk/modules/geronimo-jaxws/src/main/java/org/apache/geronimo/jaxws/client/PortMethodInterceptor.java
Wed Feb 28 13:36:34 2007
@@ -27,6 +27,8 @@
 import javax.security.auth.Subject;
 import javax.xml.namespace.QName;
 import javax.xml.ws.BindingProvider;
+import javax.xml.ws.soap.SOAPBinding;
+
 import java.lang.reflect.Method;
 import java.net.URL;
 import java.util.Iterator;
@@ -86,6 +88,13 @@
             return;
         }       
         
+        // set mtom
+        boolean enableMTOM = info.isMTOMEnabled();
+        if (enableMTOM && proxy.getBinding() instanceof SOAPBinding) {
+            ((SOAPBinding)proxy.getBinding()).setMTOMEnabled(enableMTOM);
+            LOG.debug("Set mtom property: " + enableMTOM);
+        }
+      
         // set address
         URL location = info.getLocation();
         if (location != null) {



Mime
View raw message