geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r543184 - /geronimo/server/trunk/modules/geronimo-cxf-builder/src/main/java/org/apache/geronimo/cxf/builder/CXFBuilder.java
Date Thu, 31 May 2007 17:06:30 GMT
Author: gawor
Date: Thu May 31 10:06:29 2007
New Revision: 543184

URL: http://svn.apache.org/viewvc?view=rev&rev=543184
Log:
added an option to use sun wsgen tool to generate the wsdl instead of cxf tools (cxf tooling
is used by default)

Modified:
    geronimo/server/trunk/modules/geronimo-cxf-builder/src/main/java/org/apache/geronimo/cxf/builder/CXFBuilder.java

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=543184&r1=543183&r2=543184
==============================================================================
--- 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
Thu May 31 10:06:29 2007
@@ -65,6 +65,14 @@
 
 public class CXFBuilder extends JAXWSServiceBuilder {
     private static final Log LOG = LogFactory.getLog(CXFBuilder.class);
+    
+    /**
+     * This property if enabled will cause the Sun wsgen tool to be used to 
+     * generate the WSDL for servies without WSDL. By default CXF tooling
+     * will be used the generate the WSDL.
+     */
+    private static final String USE_WSGEN_PROPERTY = 
+        "org.apache.geronimo.cxf.use.wsgen";
 
     public CXFBuilder() {
         this(null);
@@ -232,10 +240,16 @@
         }
         return in;
     }
-    
-    /*
+        
     @Override
     protected void initialize(GBeanData targetGBean, Class serviceClass, PortInfo portInfo,
Module module) 
+        throws DeploymentException {  
+        if (Boolean.getBoolean(USE_WSGEN_PROPERTY)) {
+            generateWSDL(serviceClass, portInfo, module);
+        }
+    }
+    
+    private void generateWSDL(Class serviceClass, PortInfo portInfo, Module module) 
         throws DeploymentException {
         if (isWsdlSet(portInfo, serviceClass)) {
             LOG.debug("Service " + portInfo.getServiceName() + " has WSDL.");
@@ -256,9 +270,7 @@
         }
         
         // set wsdl port
-        if (portInfo.getWsdlPort() == null) {
-            generator.setWsdlPort(serviceInfo.getEndpointName());
-        } else {
+        if (portInfo.getWsdlPort() != null) {
             generator.setWsdlPort(portInfo.getWsdlPort());
         }
                         
@@ -271,8 +283,7 @@
     private boolean isWsdlSet(PortInfo portInfo, Class serviceClass) {
         return (portInfo.getWsdlFile() != null && !portInfo.getWsdlFile().trim().equals(""))
                 || JAXWSUtils.containsWsdlLocation(serviceClass, serviceClass.getClassLoader());
-    }
-    */
+    }    
     
     public static final GBeanInfo GBEAN_INFO;
 



Mime
View raw message