cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1080453 - in /cxf/branches/2.3.x-fixes: ./ api/src/main/java/org/apache/cxf/tools/common/ maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/ tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/ tools/wsdlto/fro...
Date Fri, 11 Mar 2011 04:56:38 GMT
Author: dkulp
Date: Fri Mar 11 04:56:37 2011
New Revision: 1080453

URL: http://svn.apache.org/viewvc?rev=1080453&view=rev
Log:
Merged revisions 1080129 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1080129 | ningjiang | 2011-03-10 02:21:44 -0500 (Thu, 10 Mar 2011) | 1 line
  
  CXF-3385 Add a new option in WSD2Java to skip the generate the type classes from schema
........

Modified:
    cxf/branches/2.3.x-fixes/   (props changed)
    cxf/branches/2.3.x-fixes/api/src/main/java/org/apache/cxf/tools/common/ToolConstants.java
    cxf/branches/2.3.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/Option.java
    cxf/branches/2.3.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WsdlOption.java
    cxf/branches/2.3.x-fixes/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java
    cxf/branches/2.3.x-fixes/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/wsdlto.xml
    cxf/branches/2.3.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/jaxws-toolspec.xml
    cxf/branches/2.3.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenTest.java

Propchange: cxf/branches/2.3.x-fixes/
------------------------------------------------------------------------------
    svn:mergeinfo = /cxf/trunk:1080129

Modified: cxf/branches/2.3.x-fixes/api/src/main/java/org/apache/cxf/tools/common/ToolConstants.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/api/src/main/java/org/apache/cxf/tools/common/ToolConstants.java?rev=1080453&r1=1080452&r2=1080453&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/api/src/main/java/org/apache/cxf/tools/common/ToolConstants.java
(original)
+++ cxf/branches/2.3.x-fixes/api/src/main/java/org/apache/cxf/tools/common/ToolConstants.java
Fri Mar 11 04:56:37 2011
@@ -63,7 +63,7 @@ public final class ToolConstants {
     public static final String CFG_EXTRA_SOAPHEADER = "exsoapheader";
     public static final String CFG_DEFAULT_NS = "defaultns";
     public static final String CFG_DEFAULT_EX = "defaultex";
-    public static final String CXF_GENERATE_TYPES = "generatetypes";
+    public static final String CFG_NO_TYPES = "notypes";
     public static final String CFG_XJC_ARGS = "xjc";
     public static final String CFG_CATALOG = "catalog";
     public static final String CFG_DEFAULT_VALUES = "defaultValues";

Modified: cxf/branches/2.3.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/Option.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/Option.java?rev=1080453&r1=1080452&r2=1080453&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/Option.java
(original)
+++ cxf/branches/2.3.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/Option.java
Fri Mar 11 04:56:37 2011
@@ -137,9 +137,9 @@ public class Option {
     
     
     /**
-     * Enables or disables generation of the type classes. Default value is true.
+     * Enables or disables generation of the type classes. Default value is false.
      */
-    Boolean generateTypes;
+    Boolean noTypes;
 
     /**
      * Enables generation of fault Exception's SUID based on hash of classname.
@@ -321,12 +321,12 @@ public class Option {
         this.validateWsdl = validateWsdl;
     }
     
-    public boolean isGenerateTypes() {
-        return generateTypes == null ? true : generateTypes;
+    public boolean isNoTypes() {
+        return noTypes == null ? false : noTypes;
     }
     
-    public void setGenerateTypes(boolean generateTypes) {
-        this.generateTypes = generateTypes;
+    public void setNoTypes(boolean noTypes) {
+        this.noTypes = noTypes;
     }
 
     public boolean isUseFQCNForFaultSerialVersionUID() {
@@ -412,7 +412,7 @@ public class Option {
         destination.setPackagenames(getPackagenames());
         destination.setServiceName(getServiceName());
         destination.setValidateWsdl(isValidateWsdl());
-        destination.setGenerateTypes(isGenerateTypes());
+        destination.setNoTypes(isNoTypes());
         destination.setUseFQCNForFaultSerialVersionUID(isUseFQCNForFaultSerialVersionUID());
         destination.setMarkGenerated(isMarkGenerated());
         destination.setAllowElementRefs(isAllowElementRefs());
@@ -432,7 +432,7 @@ public class Option {
     public void merge(Option defaultOptions) {
         wsdlList = setIfNull(wsdlList, defaultOptions.wsdlList);
         extendedSoapHeaders = setIfNull(extendedSoapHeaders, defaultOptions.extendedSoapHeaders);
-        generateTypes = setIfNull(generateTypes, defaultOptions.generateTypes);
+        noTypes = setIfNull(noTypes, defaultOptions.noTypes);
         validateWsdl = setIfNull(validateWsdl, defaultOptions.validateWsdl);
         useFQCNForFaultSerialVersionUID = setIfNull(useFQCNForFaultSerialVersionUID,
             defaultOptions.useFQCNForFaultSerialVersionUID);

Modified: cxf/branches/2.3.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WsdlOption.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WsdlOption.java?rev=1080453&r1=1080452&r2=1080453&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WsdlOption.java
(original)
+++ cxf/branches/2.3.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WsdlOption.java
Fri Mar 11 04:56:37 2011
@@ -148,10 +148,7 @@ public class WsdlOption extends Option {
             list.add("-exsh");
             list.add("true");
         }
-        if (!isGenerateTypes()) {
-            list.add("-gt");
-            list.add("false");
-        }
+        addIfTrue(list, isNoTypes(), "-noTypes");
         addIfTrue(list, isAllowElementRefs(), "-allowElementRefs");
         addIfTrue(list, isValidateWsdl(), "-validate");
         addIfTrue(list, isUseFQCNForFaultSerialVersionUID(), "-useFQCNForFaultSerialVersionUID");

Modified: cxf/branches/2.3.x-fixes/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java?rev=1080453&r1=1080452&r2=1080453&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java
(original)
+++ cxf/branches/2.3.x-fixes/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java
Fri Mar 11 04:56:37 2011
@@ -238,7 +238,7 @@ public class WSDLToJavaContainer extends
             }
         }
         
-        if (!context.getBooleanValue(ToolConstants.CXF_GENERATE_TYPES, "true")) {
+        if (context.optionSet(ToolConstants.CFG_NO_TYPES)) {
             context.remove(ToolConstants.CFG_TYPES);
             context.remove(ToolConstants.CFG_ALL);
             context.remove(ToolConstants.CFG_COMPILE);
@@ -580,7 +580,7 @@ public class WSDLToJavaContainer extends
             || context.optionSet(ToolConstants.CFG_GEN_FAULT)) {
             return true;
         }
-        if (!context.getBooleanValue(ToolConstants.CXF_GENERATE_TYPES, "true")) {
+        if (context.optionSet(ToolConstants.CFG_NO_TYPES)) {
             return true;
         }
         return false;

Modified: cxf/branches/2.3.x-fixes/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/wsdlto.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/wsdlto.xml?rev=1080453&r1=1080452&r2=1080453&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/wsdlto.xml
(original)
+++ cxf/branches/2.3.x-fixes/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/wsdlto.xml
Fri Mar 11 04:56:37 2011
@@ -174,14 +174,9 @@ under the License.
                 </associatedArgument>
             </option>
             
-            <option id="generatetypes" maxOccurs="1">
-                <annotation>Enables the processing of generating the type class from
schema. The default is true.
-                </annotation>
-                <switch>gt</switch>
-                <associatedArgument placement="afterSpace">
-                    <annotation>(true, false)</annotation>
-                    <valueenum>true|false</valueenum>
-                </associatedArgument>
+            <option id="notypes" maxOccurs="1">
+                <annotation>Turns off generating types</annotation>
+                <switch>noTypes</switch>
             </option>
 
             <option id="validate" maxOccurs="1">

Modified: cxf/branches/2.3.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/jaxws-toolspec.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/jaxws-toolspec.xml?rev=1080453&r1=1080452&r2=1080453&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/jaxws-toolspec.xml
(original)
+++ cxf/branches/2.3.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/jaxws-toolspec.xml
Fri Mar 11 04:56:37 2011
@@ -236,14 +236,9 @@ Examples:
                 </associatedArgument>
             </option>
             
-            <option id="generatetypes" maxOccurs="1">
-                <annotation>Enables the processing of generating the type class from
schema. The default is true.
-                </annotation>
-                <switch>gt</switch>
-                <associatedArgument placement="afterSpace">
-                    <annotation>(true, false)</annotation>
-                    <valueenum>true|false</valueenum>
-                </associatedArgument>
+            <option id="notypes" maxOccurs="1">
+                <annotation>Turns off generating types</annotation>
+                <switch>noTypes</switch>
             </option>
 
             <option id="defaultns" maxOccurs="1">

Modified: cxf/branches/2.3.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenTest.java?rev=1080453&r1=1080452&r2=1080453&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenTest.java
(original)
+++ cxf/branches/2.3.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenTest.java
Fri Mar 11 04:56:37 2011
@@ -1337,9 +1337,16 @@ public class CodeGenTest extends Abstrac
     @Test
     public void testCXFNotType() throws Exception {
         env.put(ToolConstants.CFG_WSDLURL, getLocation("/wsdl2java_wsdl/hello_world.wsdl"));
-        env.put(ToolConstants.CXF_GENERATE_TYPES, "false");
+        env.put(ToolConstants.CFG_USE_FQCN_FAULT_SERIAL_VERSION_UID, Boolean.TRUE);
         processor.setContext(env);
         processor.execute();
+        
+        File sayHiResponseFile =
+            new File(output, "org/apache/cxf/w2j/hello_world_soap_http/types/SayHiResponse");
+        assertFalse(sayHiResponseFile.exists());
+        File greetMeResponseFile =
+            new File(output, "org/apache/cxf/w2j/hello_world_soap_http/types/GreetMeResponse");
+        assertFalse(greetMeResponseFile.exists());
     }
 
     @Test



Mime
View raw message