geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r506103 - in /geronimo/server/trunk: configs/axis2-deployer/ configs/axis2/ configs/cxf/ configs/jaxws-deployer/ configs/webservices-common/ modules/geronimo-axis2-builder/src/main/java/org/apache/geronimo/axis2/builder/ modules/geronimo-cx...
Date Sun, 11 Feb 2007 19:25:40 GMT
Author: dims
Date: Sun Feb 11 11:25:39 2007
New Revision: 506103

URL: http://svn.apache.org/viewvc?view=rev&rev=506103
Log:
- Ability to specify the ws impl from a system property, example:
  -Djavax.xml.ws.spi.Provider=org.apache.axis2.jaxws.spi.Provider
- Default is CXF as per last email from Jarek. So if the system property
  is absent, then the first deployer will kick in (which is cxf)
- Ran into a class loader issue because wsdl4j is loaded by multiple
  class loaders, so move it into webservices-common config.


Modified:
    geronimo/server/trunk/configs/axis2-deployer/pom.xml
    geronimo/server/trunk/configs/axis2/pom.xml
    geronimo/server/trunk/configs/cxf/pom.xml
    geronimo/server/trunk/configs/jaxws-deployer/pom.xml
    geronimo/server/trunk/configs/webservices-common/pom.xml
    geronimo/server/trunk/modules/geronimo-axis2-builder/src/main/java/org/apache/geronimo/axis2/builder/Axis2Builder.java
    geronimo/server/trunk/modules/geronimo-cxf-builder/src/main/java/org/apache/geronimo/cxf/builder/CXFBuilder.java
    geronimo/server/trunk/modules/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/JAXWSServiceBuilder.java

Modified: geronimo/server/trunk/configs/axis2-deployer/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/configs/axis2-deployer/pom.xml?view=diff&rev=506103&r1=506102&r2=506103
==============================================================================
--- geronimo/server/trunk/configs/axis2-deployer/pom.xml (original)
+++ geronimo/server/trunk/configs/axis2-deployer/pom.xml Sun Feb 11 11:25:39 2007
@@ -49,11 +49,6 @@
         </dependency>
 
         <dependency>
-            <groupId>wsdl4j</groupId>
-            <artifactId>wsdl4j</artifactId>
-        </dependency>
-
-        <dependency>
             <groupId>org.apache.geronimo.configs</groupId>
             <artifactId>axis2</artifactId>
             <type>car</type>

Modified: geronimo/server/trunk/configs/axis2/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/configs/axis2/pom.xml?view=diff&rev=506103&r1=506102&r2=506103
==============================================================================
--- geronimo/server/trunk/configs/axis2/pom.xml (original)
+++ geronimo/server/trunk/configs/axis2/pom.xml Sun Feb 11 11:25:39 2007
@@ -143,10 +143,6 @@
 	        <artifactId>stax-api</artifactId>
 	    </dependency>
 	    <dependency>
-	        <groupId>wsdl4j</groupId>
-	        <artifactId>wsdl4j</artifactId>
-	    </dependency>
-	    <dependency>
 	        <groupId>javax.mail</groupId>
 	        <artifactId>mail</artifactId>
 	    </dependency>

Modified: geronimo/server/trunk/configs/cxf/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/configs/cxf/pom.xml?view=diff&rev=506103&r1=506102&r2=506103
==============================================================================
--- geronimo/server/trunk/configs/cxf/pom.xml (original)
+++ geronimo/server/trunk/configs/cxf/pom.xml Sun Feb 11 11:25:39 2007
@@ -137,10 +137,6 @@
              <groupId>org.springframework</groupId>
              <artifactId>spring-context</artifactId>
          </dependency>
-        <dependency>
-            <groupId>wsdl4j</groupId>
-            <artifactId>wsdl4j</artifactId>
-        </dependency>
     </dependencies>
     
 </project>

Modified: geronimo/server/trunk/configs/jaxws-deployer/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/configs/jaxws-deployer/pom.xml?view=diff&rev=506103&r1=506102&r2=506103
==============================================================================
--- geronimo/server/trunk/configs/jaxws-deployer/pom.xml (original)
+++ geronimo/server/trunk/configs/jaxws-deployer/pom.xml Sun Feb 11 11:25:39 2007
@@ -61,12 +61,6 @@
             <scope>runtime</scope>
         </dependency>
         
-        <dependency>
-            <groupId>wsdl4j</groupId>
-            <artifactId>wsdl4j</artifactId>
-            <scope>runtime</scope>
-        </dependency>
-        
     </dependencies>
     
 </project>

Modified: geronimo/server/trunk/configs/webservices-common/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/configs/webservices-common/pom.xml?view=diff&rev=506103&r1=506102&r2=506103
==============================================================================
--- geronimo/server/trunk/configs/webservices-common/pom.xml (original)
+++ geronimo/server/trunk/configs/webservices-common/pom.xml Sun Feb 11 11:25:39 2007
@@ -45,6 +45,12 @@
             <version>${version}</version>
         </dependency>
 
+        <dependency>
+            <groupId>wsdl4j</groupId>
+            <artifactId>wsdl4j</artifactId>
+        </dependency>
+
+
         <!-- StAX implementation -->
         <dependency>
             <groupId>woodstox</groupId>

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=506103&r1=506102&r2=506103
==============================================================================
--- 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
Sun Feb 11 11:25:39 2007
@@ -17,27 +17,6 @@
 
 package org.apache.geronimo.axis2.builder;
 
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.jar.JarFile;
-
-import javax.wsdl.Definition;
-import javax.wsdl.factory.WSDLFactory;
-import javax.wsdl.xml.WSDLReader;
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Unmarshaller;
-import javax.xml.transform.stream.StreamSource;
-import javax.xml.ws.handler.Handler;
-
 import org.apache.axis2.jaxws.javaee.HandlerChainsType;
 import org.apache.axis2.jaxws.javaee.PortComponentType;
 import org.apache.axis2.jaxws.javaee.ServiceImplBeanType;
@@ -48,7 +27,6 @@
 import org.apache.geronimo.axis2.Axis2WebServiceContainerFactoryGBean;
 import org.apache.geronimo.common.DeploymentException;
 import org.apache.geronimo.deployment.DeploymentContext;
-import org.apache.geronimo.deployment.util.DeploymentUtil;
 import org.apache.geronimo.gbean.AbstractName;
 import org.apache.geronimo.gbean.GBeanData;
 import org.apache.geronimo.gbean.GBeanInfo;
@@ -57,11 +35,29 @@
 import org.apache.geronimo.j2ee.deployment.WebModule;
 import org.apache.geronimo.j2ee.deployment.WebServiceBuilder;
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
-import org.apache.geronimo.jaxws.builder.JAXWSServiceBuilder;
 import org.apache.geronimo.jaxws.PortInfo;
+import org.apache.geronimo.jaxws.builder.JAXWSServiceBuilder;
 import org.apache.geronimo.kernel.GBeanNotFoundException;
 import org.apache.geronimo.kernel.repository.Environment;
 
+import javax.wsdl.Definition;
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Unmarshaller;
+import javax.xml.transform.stream.StreamSource;
+import javax.xml.ws.handler.Handler;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.jar.JarFile;
+
 public class Axis2Builder extends JAXWSServiceBuilder {
 
 	private static final Log log = LogFactory.getLog(Axis2Builder.class);
@@ -188,8 +184,11 @@
 		throws DeploymentException {
 		
 		boolean status = super.configurePOJO(targetGBean, servletName, module, seiClassName, context);
-		
-		if(wsdlDefinition != null){
+        if(!status) {
+            return false;
+        }
+
+        if(wsdlDefinition != null){
 			//add the WSDL
 			try {
 				AbstractName containerFactoryName = context.getNaming().createChildName(targetGBean.getAbstractName(),
getContainerFactoryGBeanInfo().getName(), NameFactory.GERONIMO_SERVICE);
@@ -213,8 +212,12 @@
         
 		return status;
 	}
-	
-	private static String getString(String in) {
+
+    protected String getProviderClass() {
+        return org.apache.axis2.jaxws.spi.Provider.class.getName();
+    }
+
+    private static String getString(String in) {
         if (in != null) {
             in = in.trim();
             if (in.length() == 0) {

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=506103&r1=506102&r2=506103
==============================================================================
--- 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
Sun Feb 11 11:25:39 2007
@@ -172,6 +172,10 @@
         }
     }
 
+    protected String getProviderClass() {
+        return org.apache.cxf.jaxws.spi.ProviderImpl.class.getName();
+    }
+
     public Object createService(Class serviceInterface,
                                 Class serviceReference,
                                 URI wsdlURI,

Modified: geronimo/server/trunk/modules/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/JAXWSServiceBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/JAXWSServiceBuilder.java?view=diff&rev=506103&r1=506102&r2=506103
==============================================================================
--- geronimo/server/trunk/modules/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/JAXWSServiceBuilder.java
(original)
+++ geronimo/server/trunk/modules/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/JAXWSServiceBuilder.java
Sun Feb 11 11:25:39 2007
@@ -56,7 +56,8 @@
 
 public abstract class JAXWSServiceBuilder implements WebServiceBuilder {
     private static final Log LOG = LogFactory.getLog(JAXWSServiceBuilder.class);
-    
+    public static final String JAXWSPROVIDER_PROPERTY = "javax.xml.ws.spi.Provider";
+
     protected final Environment defaultEnvironment;
 
     public JAXWSServiceBuilder(Environment defaultEnvironment) {
@@ -211,6 +212,10 @@
                                  String seiClassName,
                                  DeploymentContext context)
             throws DeploymentException {
+        String provider = System.getProperty(JAXWSPROVIDER_PROPERTY);
+        if(provider != null && !provider.equals(getProviderClass())){
+            return false;
+        }
         Map sharedContext = ((WebModule) module).getSharedContext();
         Map portInfoMap = (Map) sharedContext.get(getKey());
         if (portInfoMap == null) {
@@ -243,7 +248,7 @@
         containerFactoryData.setAttribute("endpointClassName", seiClassName);
         containerFactoryData.setAttribute("componentContext", componentContext);
         try {
-            context.addGBean(containerFactoryData);            
+            context.addGBean(containerFactoryData);
         } catch (GBeanAlreadyExistsException e) {
             throw new DeploymentException("Could not add web service container factory gbean",
e);
         }
@@ -259,6 +264,8 @@
 
         return true;
     }
+
+    protected abstract String getProviderClass();
 
     protected abstract GBeanInfo getContainerFactoryGBeanInfo();
 



Mime
View raw message