cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r945467 - in /cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws: generators/ServiceGenerator.java template/service.vm
Date Tue, 18 May 2010 02:26:08 GMT
Author: dkulp
Date: Tue May 18 02:26:07 2010
New Revision: 945467

URL: http://svn.apache.org/viewvc?rev=945467&view=rev
Log:
If using jaxws 2.2, output the additional constructors

Modified:
    cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/ServiceGenerator.java
    cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/service.vm

Modified: cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/ServiceGenerator.java
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/ServiceGenerator.java?rev=945467&r1=945466&r2=945467&view=diff
==============================================================================
--- cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/ServiceGenerator.java
(original)
+++ cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/ServiceGenerator.java
Tue May 18 02:26:07 2010
@@ -23,6 +23,7 @@ import java.util.Map;
 
 import javax.jws.HandlerChain;
 import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
 
 import org.apache.cxf.common.i18n.Message;
 import org.apache.cxf.helpers.CastUtils;
@@ -135,6 +136,10 @@ public class ServiceGenerator extends Ab
                 }
                 setAttributes("wsdlUrl", url);
                 setCommonAttributes();
+                
+                if (Service.class.getDeclaredConstructors().length == 2) {
+                    setAttributes("jaxws22", true);
+                }
     
                 doWrite(SERVICE_TEMPLATE, parseOutputName(js.getPackageName(), 
                                                           js.getName()));

Modified: cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/service.vm
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/service.vm?rev=945467&r1=945466&r2=945467&view=diff
==============================================================================
--- cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/service.vm
(original)
+++ cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/service.vm
Tue May 18 02:26:07 2010
@@ -85,6 +85,19 @@ public class ${service.Name} extends ${s
     public ${service.Name}() {
         super(WSDL_LOCATION, SERVICE);
     }
+    
+#if ($jaxws22)     
+    public ${service.Name}(WebServiceFeature ... features) {
+        super(WSDL_LOCATION, SERVICE, features);
+    }
+    public ${service.Name}(URL wsdlLocation, WebServiceFeature ... features) {
+        super(wsdlLocation, SERVICE, features);
+    }
+
+    public ${service.Name}(URL wsdlLocation, QName serviceName, WebServiceFeature ... features)
{
+        super(wsdlLocation, serviceName, features);
+    }
+#end
 
 #foreach ($port in $service.Ports)
     /**



Mime
View raw message