axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r560106 - in /webservices/axis2/trunk/java/modules: codegen/src/org/apache/axis2/wsdl/codegen/ codegen/src/org/apache/axis2/wsdl/codegen/extension/ codegen/src/org/apache/axis2/wsdl/util/ kernel/src/org/apache/axis2/util/ tool/axis2-ant-plu...
Date Fri, 27 Jul 2007 05:26:00 GMT
Author: dims
Date: Thu Jul 26 22:25:56 2007
New Revision: 560106

URL: http://svn.apache.org/viewvc?view=rev&rev=560106
Log:
- Updating WSDL2Java Ant Task, adding support for following options:
All_PORTS_OPTION					
All_PORTS_OPTION_LONG				
BACKWORD_COMPATIBILITY_OPTION		
BACKWORD_COMPATIBILITY_OPTION_LONG	
FLATTEN_FILES_OPTION				
FLATTEN_FILES_OPTION_LONG			
NO_BUILD_XML_OPTION_LONG			
NO_MESSAGE_RECEIVER_OPTION_LONG		
NO_WSDLS_OPTION_LONG				
OVERRIDE_OPTION						
OVERRIDE_OPTION_LONG				
SUPPRESS_PREFIXES_OPTION			
SUPPRESS_PREFIXES_OPTION_LONG		
XSDCONFIG_OPTION					
XSDCONFIG_OPTION_LONG				

- Updating M2 Mojo, adding support for following options:
All_PORTS_OPTION					
All_PORTS_OPTION_LONG				
BACKWORD_COMPATIBILITY_OPTION		
BACKWORD_COMPATIBILITY_OPTION_LONG	
EXTERNAL_MAPPING_OPTION				
EXTERNAL_MAPPING_OPTION_LONG		
FLATTEN_FILES_OPTION				
FLATTEN_FILES_OPTION_LONG			
NO_BUILD_XML_OPTION_LONG			
NO_MESSAGE_RECEIVER_OPTION_LONG		
NO_WSDLS_OPTION_LONG				
OVERRIDE_OPTION						
OVERRIDE_OPTION_LONG				
REPOSITORY_PATH_OPTION				
REPOSITORY_PATH_OPTION_LONG			
RESOURCE_FOLDER_OPTION				
RESOURCE_FOLDER_OPTION_LONG			
SOURCE_FOLDER_NAME_OPTION			
SOURCE_FOLDER_NAME_OPTION_LONG		
SUPPRESS_PREFIXES_OPTION			
SUPPRESS_PREFIXES_OPTION_LONG		
UNWRAP_PARAMETERS					
UNWRAP_PARAMETERS_LONG				
WSDL_VERSION_OPTION					
WSDL_VERSION_OPTION_LONG			
XSDCONFIG_OPTION					
XSDCONFIG_OPTION_LONG				

- Remove duplicate / unused code.


Removed:
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/util/Java2WSDLOptionsValidator.java
Modified:
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/CodeGenConfiguration.java
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/CodegenConfigLoader.java
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/XMLBeansExtension.java
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/util/WSDL2JavaOptionsValidator.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/CommandLineOptionConstants.java
    webservices/axis2/trunk/java/modules/tool/axis2-ant-plugin/src/main/java/org/apache/axis2/tool/ant/AntCodegenTask.java
    webservices/axis2/trunk/java/modules/tool/axis2-eclipse-codegen-plugin/src/main/java/org/apache/axis2/tool/codegen/eclipse/CodeGenWizard.java
    webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/bean/WsdlgenBean.java
    webservices/axis2/trunk/java/modules/tool/axis2-wsdl2code-maven-plugin/src/main/java/org/apache/axis2/maven2/wsdl2code/WSDL2CodeMojo.java
    webservices/axis2/trunk/java/modules/xmlbeans/src/org/apache/axis2/xmlbeans/CodeGenerationUtility.java

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/CodeGenConfiguration.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/CodeGenConfiguration.java?view=diff&rev=560106&r1=560105&r2=560106
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/CodeGenConfiguration.java (original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/CodeGenConfiguration.java Thu Jul 26 22:25:56 2007
@@ -90,6 +90,7 @@
      * Returns the xsdconfig file to use for XMLBeans data binding.
      *
      * @return Full path and name of XMLBeans xsdconfig file to use
+     * @deprecated
      */
     public String getXsdConfigFile() {
         return xsdConfigFile;
@@ -99,6 +100,7 @@
      * Sets the xsdconfig file to use for XMLBeans data binding.
      *
      * @param xsdConfigFile Full path and name of XMLBeans xsdconfig file to use
+     * @deprecated
      */
     public void setXsdConfigFile(String xsdConfigFile) {
         this.xsdConfigFile = xsdConfigFile;

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/CodegenConfigLoader.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/CodegenConfigLoader.java?view=diff&rev=560106&r1=560105&r2=560106
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/CodegenConfigLoader.java (original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/CodegenConfigLoader.java Thu Jul 26 22:25:56 2007
@@ -21,6 +21,7 @@
 import org.apache.axis2.util.CommandLineOption;
 import org.apache.axis2.util.CommandLineOptionConstants;
 import org.apache.axis2.wsdl.i18n.CodegenMessages;
+import org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension;
 
 import java.io.File;
 import java.io.FileInputStream;
@@ -249,11 +250,12 @@
             config.setSuppressPrefixesMode(true);
         }
 
-        commandLineOption = loadOption(WSDL2JavaConstants.XSDCONFIG_OPTION,
-                                       WSDL2JavaConstants.XSDCONFIG_OPTION_LONG,
+        commandLineOption = loadOption(XMLBeansExtension.XSDCONFIG_OPTION,
+                                       XMLBeansExtension.XSDCONFIG_OPTION_LONG,
                                        optionMap);
         if (commandLineOption != null) {
-            config.setXsdConfigFile(commandLineOption.getOptionValue());
+            config.getProperties().put(XMLBeansExtension.XSDCONFIG_OPTION, 
+                    commandLineOption.getOptionValue());
         }
 
         // setting the overrid and all ports options

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/XMLBeansExtension.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/XMLBeansExtension.java?view=diff&rev=560106&r1=560105&r2=560106
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/XMLBeansExtension.java (original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/XMLBeansExtension.java Thu Jul 26 22:25:56 2007
@@ -40,6 +40,9 @@
     /** Name of "extra" option used to supply package name for xsb files. */
     public static final String TYPESYSTEMNAME_OPTION = "typesystemname";
     public static final String SCHEMA_FOLDER = "schemas";
+    public static final String XSDCONFIG_OPTION = "xc";
+    public static final String XSDCONFIG_OPTION_LONG = "xsdconfig";
+        
 
     public static String MAPPINGS = "mappings";
     public static String MAPPING = "mapping";

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/util/WSDL2JavaOptionsValidator.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/util/WSDL2JavaOptionsValidator.java?view=diff&rev=560106&r1=560105&r2=560106
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/util/WSDL2JavaOptionsValidator.java (original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/util/WSDL2JavaOptionsValidator.java Thu Jul 26 22:25:56 2007
@@ -32,116 +32,65 @@
         if (optionType.startsWith(WSDL2JavaConstants.EXTRA_OPTIONTYPE_PREFIX)) {
             invalid = false;
         } else {
-            invalid =
-                    !((WSDL2JavaConstants.WSDL_LOCATION_URI_OPTION).equalsIgnoreCase(optionType) ||
-                            (WSDL2JavaConstants.OUTPUT_LOCATION_OPTION)
-                                    .equalsIgnoreCase(optionType) ||
-                            (WSDL2JavaConstants.SERVER_SIDE_CODE_OPTION)
-                                    .equalsIgnoreCase(optionType) ||
-                            (WSDL2JavaConstants.CODEGEN_ASYNC_ONLY_OPTION)
-                                    .equalsIgnoreCase(optionType) ||
-                            (WSDL2JavaConstants.CODEGEN_SYNC_ONLY_OPTION)
-                                    .equalsIgnoreCase(optionType) ||
-                            (WSDL2JavaConstants.PACKAGE_OPTION).equalsIgnoreCase(optionType) ||
-                            (WSDL2JavaConstants.GENERATE_SERVICE_DESCRIPTION_OPTION)
-                                    .equalsIgnoreCase(optionType) ||
-                            (WSDL2JavaConstants.GENERATE_TEST_CASE_OPTION)
-                                    .equalsIgnoreCase(optionType) ||
-                            (WSDL2JavaConstants.STUB_LANGUAGE_OPTION)
-                                    .equalsIgnoreCase(optionType) ||
-                            (WSDL2JavaConstants.DATA_BINDING_TYPE_OPTION)
-                                    .equalsIgnoreCase(optionType) ||
-                            (WSDL2JavaConstants.UNPACK_CLASSES_OPTION)
-                                    .equalsIgnoreCase(optionType) ||
-                            (WSDL2JavaConstants.GENERATE_ALL_OPTION).equalsIgnoreCase(optionType) ||
-                            (WSDL2JavaConstants.PORT_NAME_OPTION).equalsIgnoreCase(optionType) ||
-                            (WSDL2JavaConstants.SERVICE_NAME_OPTION).equalsIgnoreCase(optionType) ||
-                            (WSDL2JavaConstants.REPOSITORY_PATH_OPTION)
-                                    .equalsIgnoreCase(optionType) ||
-                            (WSDL2JavaConstants.NAME_SPACE_TO_PACKAGE_OPTION)
-                                    .equalsIgnoreCase(optionType) ||
-                            (WSDL2JavaConstants.SERVER_SIDE_INTERFACE_OPTION)
-                                    .equalsIgnoreCase(optionType) ||
-                            (WSDL2JavaConstants.EXTERNAL_MAPPING_OPTION)
-                                    .equalsIgnoreCase(optionType) ||
-                            (WSDL2JavaConstants.WSDL_VERSION_OPTION).equalsIgnoreCase(optionType) ||
-                            (WSDL2JavaConstants.FLATTEN_FILES_OPTION)
-                                    .equalsIgnoreCase(optionType) ||
-                            (WSDL2JavaConstants.UNWRAP_PARAMETERS).equalsIgnoreCase(optionType) ||
-                            (WSDL2JavaConstants.BACKWORD_COMPATIBILITY_OPTION)
-                                    .equalsIgnoreCase(optionType) ||
-                            (WSDL2JavaConstants.SUPPRESS_PREFIXES_OPTION)
-                                    .equalsIgnoreCase(optionType) ||
-                            (WSDL2JavaConstants.SOURCE_FOLDER_NAME_OPTION)
-                                    .equalsIgnoreCase(optionType) ||
-                            (WSDL2JavaConstants.RESOURCE_FOLDER_OPTION)
-                                    .equalsIgnoreCase(optionType) ||
-                            (WSDL2JavaConstants.XSDCONFIG_OPTION).equalsIgnoreCase(optionType) ||
-
-                            (WSDL2JavaConstants.OUTPUT_LOCATION_OPTION_LONG)
-                                    .equalsIgnoreCase(optionType) ||
-                            (WSDL2JavaConstants.SERVER_SIDE_CODE_OPTION_LONG)
-                                    .equalsIgnoreCase(optionType) ||
-                            (WSDL2JavaConstants.CODEGEN_ASYNC_ONLY_OPTION_LONG)
-                                    .equalsIgnoreCase(optionType) ||
-                            (WSDL2JavaConstants.CODEGEN_SYNC_ONLY_OPTION_LONG)
-                                    .equalsIgnoreCase(optionType) ||
-                            (WSDL2JavaConstants.PACKAGE_OPTION_LONG).equalsIgnoreCase(optionType) ||
-                            (WSDL2JavaConstants.GENERATE_SERVICE_DESCRIPTION_OPTION_LONG)
-                                    .equalsIgnoreCase(optionType) ||
-                            (WSDL2JavaConstants.GENERATE_TEST_CASE_OPTION_LONG)
-                                    .equalsIgnoreCase(optionType) ||
-                            (WSDL2JavaConstants.STUB_LANGUAGE_OPTION_LONG)
-                                    .equalsIgnoreCase(optionType) ||
-                            (WSDL2JavaConstants.DATA_BINDING_TYPE_OPTION_LONG)
-                                    .equalsIgnoreCase(optionType) ||
-                            (WSDL2JavaConstants.UNPACK_CLASSES_OPTION_LONG)
-                                    .equalsIgnoreCase(optionType) ||
-                            (WSDL2JavaConstants.PORT_NAME_OPTION_LONG)
-                                    .equalsIgnoreCase(optionType) ||
-                            (WSDL2JavaConstants.SERVICE_NAME_OPTION_LONG)
-                                    .equalsIgnoreCase(optionType) ||
-                            (WSDL2JavaConstants.GENERATE_ALL_OPTION_LONG)
-                                    .equalsIgnoreCase(optionType) ||
-                            (WSDL2JavaConstants.NAME_SPACE_TO_PACKAGE_OPTION_LONG)
-                                    .equalsIgnoreCase(optionType) ||
-                            (WSDL2JavaConstants.SERVER_SIDE_INTERFACE_OPTION_LONG)
-                                    .equalsIgnoreCase(optionType) ||
-                            (WSDL2JavaConstants.EXTERNAL_MAPPING_OPTION_LONG)
-                                    .equalsIgnoreCase(optionType) ||
-                            (WSDL2JavaConstants.WSDL_VERSION_OPTION_LONG)
-                                    .equalsIgnoreCase(optionType) ||
-                            (WSDL2JavaConstants.FLATTEN_FILES_OPTION_LONG)
-                                    .equalsIgnoreCase(optionType) ||
-                            (WSDL2JavaConstants.UNWRAP_PARAMETERS_LONG)
-                                    .equalsIgnoreCase(optionType) ||
-                            (WSDL2JavaConstants.REPOSITORY_PATH_OPTION_LONG)
-                                    .equalsIgnoreCase(optionType) ||
-                            (WSDL2JavaConstants.SOURCE_FOLDER_NAME_OPTION_LONG)
-                                    .equalsIgnoreCase(optionType) ||
-                            (WSDL2JavaConstants.RESOURCE_FOLDER_OPTION_LONG)
-                                    .equalsIgnoreCase(optionType) ||
-                            (WSDL2JavaConstants.BACKWORD_COMPATIBILITY_OPTION_LONG)
-                                    .equalsIgnoreCase(optionType) ||
-                            (WSDL2JavaConstants.SUPPRESS_PREFIXES_OPTION_LONG)
-                                    .equalsIgnoreCase(optionType) ||
-                            (WSDL2JavaConstants.XSDCONFIG_OPTION_LONG)
-                                    .equalsIgnoreCase(optionType) ||
-                            (WSDL2JavaConstants.NO_MESSAGE_RECEIVER_OPTION_LONG)
-                                    .equalsIgnoreCase(optionType) ||
-                            (WSDL2JavaConstants.NO_WSDLS_OPTION_LONG)
-                                    .equalsIgnoreCase(optionType) ||
-                            (WSDL2JavaConstants.NO_BUILD_XML_OPTION_LONG)
-                                    .equalsIgnoreCase(optionType) ||
-                            (WSDL2JavaConstants.All_PORTS_OPTION)
-                                    .equalsIgnoreCase(optionType) ||
-                            (WSDL2JavaConstants.All_PORTS_OPTION_LONG)
-                                    .equalsIgnoreCase(optionType) ||
-                            (WSDL2JavaConstants.OVERRIDE_OPTION)
-                                    .equalsIgnoreCase(optionType) ||
-                            (WSDL2JavaConstants.OVERRIDE_OPTION_LONG)
-                                    .equalsIgnoreCase(optionType)
-                    );
+            invalid = !(WSDL2JavaConstants.All_PORTS_OPTION.equalsIgnoreCase(optionType) ||
+                    WSDL2JavaConstants.All_PORTS_OPTION_LONG.equalsIgnoreCase(optionType) ||
+                    WSDL2JavaConstants.BACKWORD_COMPATIBILITY_OPTION.equalsIgnoreCase(optionType) ||
+                    WSDL2JavaConstants.BACKWORD_COMPATIBILITY_OPTION_LONG.equalsIgnoreCase(optionType) ||
+                    WSDL2JavaConstants.CODEGEN_ASYNC_ONLY_OPTION.equalsIgnoreCase(optionType) ||
+                    WSDL2JavaConstants.CODEGEN_ASYNC_ONLY_OPTION_LONG.equalsIgnoreCase(optionType) ||
+                    WSDL2JavaConstants.CODEGEN_SYNC_ONLY_OPTION.equalsIgnoreCase(optionType) ||
+                    WSDL2JavaConstants.CODEGEN_SYNC_ONLY_OPTION_LONG.equalsIgnoreCase(optionType) ||
+                    WSDL2JavaConstants.DATA_BINDING_TYPE_OPTION.equalsIgnoreCase(optionType) ||
+                    WSDL2JavaConstants.DATA_BINDING_TYPE_OPTION_LONG.equalsIgnoreCase(optionType) ||
+                    WSDL2JavaConstants.EXTERNAL_MAPPING_OPTION.equalsIgnoreCase(optionType) ||
+                    WSDL2JavaConstants.EXTERNAL_MAPPING_OPTION_LONG.equalsIgnoreCase(optionType) ||
+                    WSDL2JavaConstants.FLATTEN_FILES_OPTION.equalsIgnoreCase(optionType) ||
+                    WSDL2JavaConstants.FLATTEN_FILES_OPTION_LONG.equalsIgnoreCase(optionType) ||
+                    WSDL2JavaConstants.GENERATE_ALL_OPTION.equalsIgnoreCase(optionType) ||
+                    WSDL2JavaConstants.GENERATE_ALL_OPTION_LONG.equalsIgnoreCase(optionType) ||
+                    WSDL2JavaConstants.GENERATE_SERVICE_DESCRIPTION_OPTION.equalsIgnoreCase(optionType) ||
+                    WSDL2JavaConstants.GENERATE_SERVICE_DESCRIPTION_OPTION_LONG.equalsIgnoreCase(optionType) ||
+                    WSDL2JavaConstants.GENERATE_TEST_CASE_OPTION.equalsIgnoreCase(optionType) ||
+                    WSDL2JavaConstants.GENERATE_TEST_CASE_OPTION_LONG.equalsIgnoreCase(optionType) ||
+                    WSDL2JavaConstants.NAME_SPACE_TO_PACKAGE_OPTION.equalsIgnoreCase(optionType) ||
+                    WSDL2JavaConstants.NAME_SPACE_TO_PACKAGE_OPTION_LONG.equalsIgnoreCase(optionType) ||
+                    WSDL2JavaConstants.NO_BUILD_XML_OPTION_LONG.equalsIgnoreCase(optionType) ||
+                    WSDL2JavaConstants.NO_MESSAGE_RECEIVER_OPTION_LONG.equalsIgnoreCase(optionType) ||
+                    WSDL2JavaConstants.NO_WSDLS_OPTION_LONG.equalsIgnoreCase(optionType) ||
+                    WSDL2JavaConstants.OUTPUT_LOCATION_OPTION.equalsIgnoreCase(optionType) ||
+                    WSDL2JavaConstants.OUTPUT_LOCATION_OPTION_LONG.equalsIgnoreCase(optionType) ||
+                    WSDL2JavaConstants.OVERRIDE_OPTION.equalsIgnoreCase(optionType) ||
+                    WSDL2JavaConstants.OVERRIDE_OPTION_LONG.equalsIgnoreCase(optionType) ||
+                    WSDL2JavaConstants.PACKAGE_OPTION.equalsIgnoreCase(optionType) ||
+                    WSDL2JavaConstants.PACKAGE_OPTION_LONG.equalsIgnoreCase(optionType) ||
+                    WSDL2JavaConstants.PORT_NAME_OPTION.equalsIgnoreCase(optionType) ||
+                    WSDL2JavaConstants.PORT_NAME_OPTION_LONG.equalsIgnoreCase(optionType) ||
+                    WSDL2JavaConstants.REPOSITORY_PATH_OPTION.equalsIgnoreCase(optionType) ||
+                    WSDL2JavaConstants.REPOSITORY_PATH_OPTION_LONG.equalsIgnoreCase(optionType) ||
+                    WSDL2JavaConstants.RESOURCE_FOLDER_OPTION.equalsIgnoreCase(optionType) ||
+                    WSDL2JavaConstants.RESOURCE_FOLDER_OPTION_LONG.equalsIgnoreCase(optionType) ||
+                    WSDL2JavaConstants.SERVER_SIDE_CODE_OPTION.equalsIgnoreCase(optionType) ||
+                    WSDL2JavaConstants.SERVER_SIDE_CODE_OPTION_LONG.equalsIgnoreCase(optionType) ||
+                    WSDL2JavaConstants.SERVER_SIDE_INTERFACE_OPTION.equalsIgnoreCase(optionType) ||
+                    WSDL2JavaConstants.SERVER_SIDE_INTERFACE_OPTION_LONG.equalsIgnoreCase(optionType) ||
+                    WSDL2JavaConstants.SERVICE_NAME_OPTION.equalsIgnoreCase(optionType) ||
+                    WSDL2JavaConstants.SERVICE_NAME_OPTION_LONG.equalsIgnoreCase(optionType) ||
+                    WSDL2JavaConstants.SOURCE_FOLDER_NAME_OPTION.equalsIgnoreCase(optionType) ||
+                    WSDL2JavaConstants.SOURCE_FOLDER_NAME_OPTION_LONG.equalsIgnoreCase(optionType) ||
+                    WSDL2JavaConstants.STUB_LANGUAGE_OPTION.equalsIgnoreCase(optionType) ||
+                    WSDL2JavaConstants.STUB_LANGUAGE_OPTION_LONG.equalsIgnoreCase(optionType) ||
+                    WSDL2JavaConstants.SUPPRESS_PREFIXES_OPTION.equalsIgnoreCase(optionType) ||
+                    WSDL2JavaConstants.SUPPRESS_PREFIXES_OPTION_LONG.equalsIgnoreCase(optionType) ||
+                    WSDL2JavaConstants.UNPACK_CLASSES_OPTION.equalsIgnoreCase(optionType) ||
+                    WSDL2JavaConstants.UNPACK_CLASSES_OPTION_LONG.equalsIgnoreCase(optionType) ||
+                    WSDL2JavaConstants.UNWRAP_PARAMETERS.equalsIgnoreCase(optionType) ||
+                    WSDL2JavaConstants.UNWRAP_PARAMETERS_LONG.equalsIgnoreCase(optionType) ||
+                    WSDL2JavaConstants.WSDL_LOCATION_URI_OPTION.equalsIgnoreCase(optionType) ||
+                    WSDL2JavaConstants.WSDL_VERSION_OPTION.equalsIgnoreCase(optionType) ||
+                    WSDL2JavaConstants.WSDL_VERSION_OPTION_LONG.equalsIgnoreCase(optionType) ||
+                    WSDL2JavaConstants.XSDCONFIG_OPTION.equalsIgnoreCase(optionType) ||
+                    WSDL2JavaConstants.XSDCONFIG_OPTION_LONG.equalsIgnoreCase(optionType)
+            );
 
         }
 

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/CommandLineOptionConstants.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/CommandLineOptionConstants.java?view=diff&rev=560106&r1=560105&r2=560106
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/CommandLineOptionConstants.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/CommandLineOptionConstants.java Thu Jul 26 22:25:56 2007
@@ -22,104 +22,70 @@
 public interface CommandLineOptionConstants {
 
     interface WSDL2JavaConstants {
-
-        //short option constants
-        String WSDL_LOCATION_URI_OPTION = "uri";
-        String OUTPUT_LOCATION_OPTION = "o";
-        String SERVER_SIDE_CODE_OPTION = "ss";
-        String GENERATE_SERVICE_DESCRIPTION_OPTION = "sd";
+        String All_PORTS_OPTION = "ap";
+        String All_PORTS_OPTION_LONG = "all-ports";
+        String BACKWORD_COMPATIBILITY_OPTION = "b";
+        String BACKWORD_COMPATIBILITY_OPTION_LONG = "backword-compatible";
         String CODEGEN_ASYNC_ONLY_OPTION = "a";
+        String CODEGEN_ASYNC_ONLY_OPTION_LONG = "async";
         String CODEGEN_SYNC_ONLY_OPTION = "s";
-        String PACKAGE_OPTION = "p";
-        String STUB_LANGUAGE_OPTION = "l";
-        String GENERATE_TEST_CASE_OPTION = "t";
+        String CODEGEN_SYNC_ONLY_OPTION_LONG = "sync";
         String DATA_BINDING_TYPE_OPTION = "d";
-        String UNPACK_CLASSES_OPTION = "u";
+        String DATA_BINDING_TYPE_OPTION_LONG = "databinding-method";
+        String EXTERNAL_MAPPING_OPTION = "em";
+        String EXTERNAL_MAPPING_OPTION_LONG = "external-mapping";
+        String FLATTEN_FILES_OPTION = "f";
+        String FLATTEN_FILES_OPTION_LONG = "flatten-files";
         String GENERATE_ALL_OPTION = "g";
+        String GENERATE_ALL_OPTION_LONG = "generate-all";
+        String GENERATE_SERVICE_DESCRIPTION_OPTION = "sd";
+        String GENERATE_SERVICE_DESCRIPTION_OPTION_LONG = "service-description";
+        String GENERATE_TEST_CASE_OPTION = "t";
+        String GENERATE_TEST_CASE_OPTION_LONG = "test-case";
+        String NAME_SPACE_TO_PACKAGE_OPTION = "ns2p";
+        String NAME_SPACE_TO_PACKAGE_OPTION_LONG = "namespace2package";
+        String NO_BUILD_XML_OPTION_LONG = "noBuildXML";
+        String NO_MESSAGE_RECEIVER_OPTION_LONG = "noMessageReceiver";
+        String NO_WSDLS_OPTION_LONG = "noWSDL";
+        String OUTPUT_LOCATION_OPTION = "o";
+        String OUTPUT_LOCATION_OPTION_LONG = "output";
+        String OVERRIDE_OPTION = "or";
+        String OVERRIDE_OPTION_LONG = "over-ride";
+        String PACKAGE_OPTION = "p";
+        String PACKAGE_OPTION_LONG = "package";
         String PORT_NAME_OPTION = "pn";
-        String SERVICE_NAME_OPTION = "sn";
+        String PORT_NAME_OPTION_LONG = "port-name";
         String REPOSITORY_PATH_OPTION = "r";
-        String NAME_SPACE_TO_PACKAGE_OPTION = "ns2p";
-        String SERVER_SIDE_INTERFACE_OPTION = "ssi";
-        String EXTERNAL_MAPPING_OPTION = "em";
-        String WSDL_VERSION_OPTION = "wv";
-        String FLATTEN_FILES_OPTION = "f";
-        String UNWRAP_PARAMETERS = "uw";
-        String BACKWORD_COMPATIBILITY_OPTION = "b";
-        String SUPPRESS_PREFIXES_OPTION = "sp";
-        String SOURCE_FOLDER_NAME_OPTION = "S";
+        String REPOSITORY_PATH_OPTION_LONG = "repository-path";
         String RESOURCE_FOLDER_OPTION = "R";
-        String XSDCONFIG_OPTION = "xc";
-        String All_PORTS_OPTION = "ap";
-        String OVERRIDE_OPTION = "or";
-
-        //long option constants
-        String OUTPUT_LOCATION_OPTION_LONG = "output";
+        String RESOURCE_FOLDER_OPTION_LONG = "resource-folder";
+        String SERVER_SIDE_CODE_OPTION = "ss";
         String SERVER_SIDE_CODE_OPTION_LONG = "server-side";
-        String GENERATE_SERVICE_DESCRIPTION_OPTION_LONG = "service-description";
-        String CODEGEN_ASYNC_ONLY_OPTION_LONG = "async";
-        String CODEGEN_SYNC_ONLY_OPTION_LONG = "sync";
-        String PACKAGE_OPTION_LONG = "package";
+        String SERVER_SIDE_INTERFACE_OPTION = "ssi";
+        String SERVER_SIDE_INTERFACE_OPTION_LONG = "serverside-interface";
+        String SERVICE_NAME_OPTION = "sn";
+        String SERVICE_NAME_OPTION_LONG = "service-name";
+        String SOURCE_FOLDER_NAME_OPTION = "S";
+        String SOURCE_FOLDER_NAME_OPTION_LONG = "source-folder";
+        String STUB_LANGUAGE_OPTION = "l";
         String STUB_LANGUAGE_OPTION_LONG = "language";
-        String GENERATE_TEST_CASE_OPTION_LONG = "test-case";
-        String DATA_BINDING_TYPE_OPTION_LONG = "databinding-method";
+        String SUPPRESS_PREFIXES_OPTION = "sp";
+        String SUPPRESS_PREFIXES_OPTION_LONG = "suppress-prefixes";
+        String UNPACK_CLASSES_OPTION = "u";
         String UNPACK_CLASSES_OPTION_LONG = "unpack-classes";
-        String GENERATE_ALL_OPTION_LONG = "generate-all";
-        String PORT_NAME_OPTION_LONG = "port-name";
-        String SERVICE_NAME_OPTION_LONG = "service-name";
+        String UNWRAP_PARAMETERS = "uw";
+        String UNWRAP_PARAMETERS_LONG = "unwrap-params";
+        String WSDL_LOCATION_URI_OPTION = "uri";
+        String WSDL_VERSION_OPTION = "wv";
+        String WSDL_VERSION_OPTION_LONG = "wsdl-version";
+
         String INVALID_OPTION = "INVALID_OPTION";
         String EXTRA_OPTIONTYPE_PREFIX = "E";
-        String REPOSITORY_PATH_OPTION_LONG = "repository-path";
-        String NAME_SPACE_TO_PACKAGE_OPTION_LONG = "namespace2package";
-        String SERVER_SIDE_INTERFACE_OPTION_LONG = "serverside-interface";
-        String EXTERNAL_MAPPING_OPTION_LONG = "external-mapping";
-        String WSDL_VERSION_OPTION_LONG = "wsdl-version";
-        String FLATTEN_FILES_OPTION_LONG = "flatten-files";
-        String UNWRAP_PARAMETERS_LONG = "unwrap-params";
-        String BACKWORD_COMPATIBILITY_OPTION_LONG = "backword-compatible";
-        String SUPPRESS_PREFIXES_OPTION_LONG = "suppress-prefixes";
-        String SOURCE_FOLDER_NAME_OPTION_LONG = "source-folder";
-        String RESOURCE_FOLDER_OPTION_LONG = "resource-folder";
-        String XSDCONFIG_OPTION_LONG = "xsdconfig";
-        String All_PORTS_OPTION_LONG = "all-ports";
-        String OVERRIDE_OPTION_LONG = "over-ride";
 
         String WSDL_VERSION_2 = "2.0";
         String WSDL_VERSION_2_OPTIONAL = "2";
         String WSDL_VERSION_1 = "1.1";
-
-
-        String NO_MESSAGE_RECEIVER_OPTION_LONG = "noMessageReceiver";
-        String NO_WSDLS_OPTION_LONG = "noWSDL";
-        String NO_BUILD_XML_OPTION_LONG = "noBuildXML";
-    }
-
-    interface Java2WSDLConstants {
-        String OUTPUT_LOCATION_OPTION = "o";
-        String OUTPUT_FILENAME_OPTION = "of";
-        String CLASSNAME_OPTION = "cn";
-        String CLASSPATH_OPTION = "cp";
-        String TARGET_NAMESPACE_OPTION = "tn";
-        String TARGET_NAMESPACE_PREFIX_OPTION = "tp";
-        String SCHEMA_TARGET_NAMESPACE_OPTION = "stn";
-        String SCHEMA_TARGET_NAMESPACE_PREFIX_OPTION = "stp";
-        String SERVICE_NAME_OPTION = "sn";
-
-        //long option constants
-        String OUTPUT_LOCATION_OPTION_LONG = "output";
-        String TARGET_NAMESPACE_OPTION_LONG = "targetNamespace";
-        String TARGET_NAMESPACE_PREFIX_OPTION_LONG = "targetNamespacePrefix";
-        String SERVICE_NAME_OPTION_LONG = "serviceName";
-        String CLASSNAME_OPTION_LONG = "className";
-        String CLASSPATH_OPTION_LONG = "classPath";
-        String OUTPUT_FILENAME_OPTION_LONG = "outputFilename";
-        String SCHEMA_TARGET_NAMESPACE_OPTION_LONG = "schemaTargetnamespace";
-        String SCHEMA_TARGET_NAMESPACE_PREFIX_OPTION_LONG = "schemaTargetnamespacePrefix";
-
-
     }
 
     public static final String SOLE_INPUT = "SOLE_INPUT";
-
-
 }

Modified: webservices/axis2/trunk/java/modules/tool/axis2-ant-plugin/src/main/java/org/apache/axis2/tool/ant/AntCodegenTask.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/tool/axis2-ant-plugin/src/main/java/org/apache/axis2/tool/ant/AntCodegenTask.java?view=diff&rev=560106&r1=560105&r2=560106
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/axis2-ant-plugin/src/main/java/org/apache/axis2/tool/ant/AntCodegenTask.java (original)
+++ webservices/axis2/trunk/java/modules/tool/axis2-ant-plugin/src/main/java/org/apache/axis2/tool/ant/AntCodegenTask.java Thu Jul 26 22:25:56 2007
@@ -30,9 +30,12 @@
 import org.apache.tools.ant.Task;
 import org.apache.tools.ant.types.Path;
 import org.apache.tools.ant.types.Reference;
+import org.apache.tools.ant.types.Parameter;
 
 import java.util.HashMap;
 import java.util.Map;
+import java.util.Properties;
+import java.util.Iterator;
 
 public class AntCodegenTask extends Task {
 
@@ -53,6 +56,16 @@
     private boolean unpackClasses = false;
     private boolean serverSideInterface = false;
 
+    private boolean allPorts = false;
+    private boolean backwardCompatible = false;
+    private boolean flattenFiles = false;
+    private boolean skipMessageReceiver = false;
+    private boolean skipBuildXML = false;
+    private boolean skipWSDL = false;
+    private boolean overWrite = false;
+    private boolean suppressPrefixes = false;
+    private Properties props = new Properties();
+
     private String repositoryPath = null;
     private String externalMapping = null;
     private String wsdlVersion = null;
@@ -272,6 +285,82 @@
                             CommandLineOptionConstants.WSDL2JavaConstants.SERVER_SIDE_INTERFACE_OPTION,
                             new String[0]));
         }
+
+        if (allPorts) {
+            optionMap.put(
+                    CommandLineOptionConstants.WSDL2JavaConstants.All_PORTS_OPTION,
+                    new CommandLineOption(
+                            CommandLineOptionConstants.WSDL2JavaConstants.All_PORTS_OPTION,
+                            new String[0]));
+        }
+
+        if (backwardCompatible) {
+            optionMap.put(
+                    CommandLineOptionConstants.WSDL2JavaConstants.BACKWORD_COMPATIBILITY_OPTION,
+                    new CommandLineOption(
+                            CommandLineOptionConstants.WSDL2JavaConstants.BACKWORD_COMPATIBILITY_OPTION,
+                            new String[0]));
+        }
+
+        if (flattenFiles) {
+            optionMap.put(
+                    CommandLineOptionConstants.WSDL2JavaConstants.FLATTEN_FILES_OPTION,
+                    new CommandLineOption(
+                            CommandLineOptionConstants.WSDL2JavaConstants.FLATTEN_FILES_OPTION,
+                            new String[0]));
+        }
+
+        if (skipMessageReceiver) {
+            optionMap.put(
+                    CommandLineOptionConstants.WSDL2JavaConstants.NO_MESSAGE_RECEIVER_OPTION_LONG,
+                    new CommandLineOption(
+                            CommandLineOptionConstants.WSDL2JavaConstants.NO_MESSAGE_RECEIVER_OPTION_LONG,
+                            new String[0]));
+        }
+
+        if (skipBuildXML) {
+            optionMap.put(
+                    CommandLineOptionConstants.WSDL2JavaConstants.NO_BUILD_XML_OPTION_LONG,
+                    new CommandLineOption(
+                            CommandLineOptionConstants.WSDL2JavaConstants.NO_BUILD_XML_OPTION_LONG,
+                            new String[0]));
+        }
+
+        if (skipWSDL) {
+            optionMap.put(
+                    CommandLineOptionConstants.WSDL2JavaConstants.NO_WSDLS_OPTION_LONG,
+                    new CommandLineOption(
+                            CommandLineOptionConstants.WSDL2JavaConstants.NO_WSDLS_OPTION_LONG,
+                            new String[0]));
+        }
+
+        if (overWrite) {
+            optionMap.put(
+                    CommandLineOptionConstants.WSDL2JavaConstants.OVERRIDE_OPTION,
+                    new CommandLineOption(
+                            CommandLineOptionConstants.WSDL2JavaConstants.OVERRIDE_OPTION,
+                            new String[0]));
+        }
+
+        if (suppressPrefixes) {
+            optionMap.put(
+                    CommandLineOptionConstants.WSDL2JavaConstants.SUPPRESS_PREFIXES_OPTION,
+                    new CommandLineOption(
+                            CommandLineOptionConstants.WSDL2JavaConstants.SUPPRESS_PREFIXES_OPTION,
+                            new String[0]));
+        }
+
+        Iterator iterator = props.entrySet().iterator();
+        while (iterator.hasNext()) {
+            Map.Entry entry = (Map.Entry) iterator.next();
+            String key = CommandLineOptionConstants.WSDL2JavaConstants.EXTRA_OPTIONTYPE_PREFIX + entry.getKey();
+            optionMap.put(
+                    key,
+                    new CommandLineOption(
+                            key,
+                            new String[]{(String) entry.getValue()}));
+        }
+
         optionMap.put(
                 CommandLineOptionConstants.WSDL2JavaConstants.SERVICE_NAME_OPTION,
                 new CommandLineOption(
@@ -431,5 +520,41 @@
 
     public void setNamespaceToPackages(String namespaceToPackages) {
         this.namespaceToPackages = namespaceToPackages;
+    }
+
+    public void addConfiguredParameter(Parameter prop) {
+        props.setProperty(prop.getName(), prop.getValue());
+    }
+
+    public void setSuppressPrefixes(boolean suppressPrefixes) {
+        this.suppressPrefixes = suppressPrefixes;
+    }
+
+    public void setOverWrite(boolean overWrite) {
+        this.overWrite = overWrite;
+    }
+
+    public void setSkipWSDL(boolean skipWSDL) {
+        this.skipWSDL = skipWSDL;
+    }
+
+    public void setSkipBuildXML(boolean skipBuildXML) {
+        this.skipBuildXML = skipBuildXML;
+    }
+
+    public void setSkipMessageReceiver(boolean skipMessageReceiver) {
+        this.skipMessageReceiver = skipMessageReceiver;
+    }
+
+    public void setFlattenFiles(boolean flattenFiles) {
+        this.flattenFiles = flattenFiles;
+    }
+
+    public void setBackwardCompatible(boolean backwardCompatible) {
+        this.backwardCompatible = backwardCompatible;
+    }
+
+    public void setAllPorts(boolean allPorts) {
+        this.allPorts = allPorts;
     }
 }

Modified: webservices/axis2/trunk/java/modules/tool/axis2-eclipse-codegen-plugin/src/main/java/org/apache/axis2/tool/codegen/eclipse/CodeGenWizard.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/tool/axis2-eclipse-codegen-plugin/src/main/java/org/apache/axis2/tool/codegen/eclipse/CodeGenWizard.java?view=diff&rev=560106&r1=560105&r2=560106
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/axis2-eclipse-codegen-plugin/src/main/java/org/apache/axis2/tool/codegen/eclipse/CodeGenWizard.java (original)
+++ webservices/axis2/trunk/java/modules/tool/axis2-eclipse-codegen-plugin/src/main/java/org/apache/axis2/tool/codegen/eclipse/CodeGenWizard.java Thu Jul 26 22:25:56 2007
@@ -32,6 +32,7 @@
 import javax.wsdl.Definition;
 
 import org.apache.axis2.description.AxisService;
+import org.apache.axis2.description.java2wsdl.Java2WSDLConstants;
 import org.apache.axis2.tool.codegen.WSDL2JavaGenerator;
 import org.apache.axis2.tool.codegen.eclipse.plugin.CodegenWizardPlugin;
 import org.apache.axis2.tool.codegen.eclipse.ui.AbstractWizardPage;
@@ -70,7 +71,7 @@
  * The main wizard for the codegen wizard
  */
 
-public class CodeGenWizard extends Wizard implements INewWizard,CommandLineOptionConstants.Java2WSDLConstants {
+public class CodeGenWizard extends Wizard implements INewWizard, Java2WSDLConstants {
     private ToolSelectionPage toolSelectionPage;
     
     private WSDLFileSelectionPage wsdlSelectionPage;

Modified: webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/bean/WsdlgenBean.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/bean/WsdlgenBean.java?view=diff&rev=560106&r1=560105&r2=560106
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/bean/WsdlgenBean.java (original)
+++ webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/bean/WsdlgenBean.java Thu Jul 26 22:25:56 2007
@@ -19,6 +19,7 @@
 package org.apache.axis2.tools.bean;
 
 import org.apache.axis2.util.CommandLineOptionConstants;
+import org.apache.axis2.description.java2wsdl.Java2WSDLConstants;
 import org.apache.ws.java2wsdl.utils.Java2WSDLCommandLineOption;
 import org.apache.ws.java2wsdl.Java2WSDLCodegenEngine;
 import java.util.HashMap;
@@ -120,48 +121,48 @@
 
         Map optionMap = new HashMap();
 
-        optionMap.put(CommandLineOptionConstants.Java2WSDLConstants .CLASSNAME_OPTION ,
-                new Java2WSDLCommandLineOption(CommandLineOptionConstants.Java2WSDLConstants.CLASSNAME_OPTION ,
+        optionMap.put(Java2WSDLConstants .CLASSNAME_OPTION ,
+                new Java2WSDLCommandLineOption(Java2WSDLConstants.CLASSNAME_OPTION ,
                         new String[]{getClassName() })
         );
 
-        optionMap.put(CommandLineOptionConstants.Java2WSDLConstants .CLASSPATH_OPTION ,
-                new Java2WSDLCommandLineOption(CommandLineOptionConstants .Java2WSDLConstants .CLASSPATH_OPTION ,
+        optionMap.put(Java2WSDLConstants.CLASSPATH_OPTION ,
+                new Java2WSDLCommandLineOption(Java2WSDLConstants .CLASSPATH_OPTION ,
                         getClassPathList())
         );
 
-        optionMap.put(CommandLineOptionConstants.Java2WSDLConstants .TARGET_NAMESPACE_OPTION ,
-                new Java2WSDLCommandLineOption(CommandLineOptionConstants .Java2WSDLConstants .TARGET_NAMESPACE_OPTION ,
+        optionMap.put(Java2WSDLConstants .TARGET_NAMESPACE_OPTION ,
+                new Java2WSDLCommandLineOption(Java2WSDLConstants .TARGET_NAMESPACE_OPTION ,
                         new String[]{getTargetNamespace() })
         );
 
-        optionMap.put(CommandLineOptionConstants.Java2WSDLConstants .TARGET_NAMESPACE_PREFIX_OPTION ,
-                new Java2WSDLCommandLineOption(CommandLineOptionConstants .Java2WSDLConstants .TARGET_NAMESPACE_PREFIX_OPTION ,
+        optionMap.put(Java2WSDLConstants .TARGET_NAMESPACE_PREFIX_OPTION ,
+                new Java2WSDLCommandLineOption(Java2WSDLConstants .TARGET_NAMESPACE_PREFIX_OPTION ,
                         new String[]{getTargetNamespacePrefix()})
         );
 
-        optionMap.put(CommandLineOptionConstants.Java2WSDLConstants .SCHEMA_TARGET_NAMESPACE_OPTION ,
-                new Java2WSDLCommandLineOption(CommandLineOptionConstants .Java2WSDLConstants .SCHEMA_TARGET_NAMESPACE_OPTION ,
+        optionMap.put(Java2WSDLConstants .SCHEMA_TARGET_NAMESPACE_OPTION ,
+                new Java2WSDLCommandLineOption(Java2WSDLConstants .SCHEMA_TARGET_NAMESPACE_OPTION ,
                         new String[]{getSchemaTargetNamespace() })
         );
 
-        optionMap.put(CommandLineOptionConstants.Java2WSDLConstants .SERVICE_NAME_OPTION ,
-                new Java2WSDLCommandLineOption(CommandLineOptionConstants .Java2WSDLConstants .SERVICE_NAME_OPTION ,
+        optionMap.put(Java2WSDLConstants .SERVICE_NAME_OPTION ,
+                new Java2WSDLCommandLineOption(Java2WSDLConstants .SERVICE_NAME_OPTION ,
                         new String[]{getServiceName() })
         );
 
-        optionMap.put(CommandLineOptionConstants.Java2WSDLConstants .SCHEMA_TARGET_NAMESPACE_PREFIX_OPTION ,
-                new Java2WSDLCommandLineOption(CommandLineOptionConstants .Java2WSDLConstants .SCHEMA_TARGET_NAMESPACE_PREFIX_OPTION ,
+        optionMap.put(Java2WSDLConstants .SCHEMA_TARGET_NAMESPACE_PREFIX_OPTION ,
+                new Java2WSDLCommandLineOption(Java2WSDLConstants .SCHEMA_TARGET_NAMESPACE_PREFIX_OPTION ,
                         new String[]{getSchemaTargetNamespacePrefix() })
         );
 
-        optionMap.put(CommandLineOptionConstants.Java2WSDLConstants .OUTPUT_LOCATION_OPTION ,
-                new Java2WSDLCommandLineOption(CommandLineOptionConstants .Java2WSDLConstants .OUTPUT_LOCATION_OPTION ,
+        optionMap.put(Java2WSDLConstants .OUTPUT_LOCATION_OPTION ,
+                new Java2WSDLCommandLineOption(Java2WSDLConstants .OUTPUT_LOCATION_OPTION ,
                         new String[]{getOutputLocation()})
         );
 
-        optionMap.put(CommandLineOptionConstants.Java2WSDLConstants .OUTPUT_FILENAME_OPTION ,
-                new Java2WSDLCommandLineOption(CommandLineOptionConstants .Java2WSDLConstants .OUTPUT_FILENAME_OPTION ,
+        optionMap.put(Java2WSDLConstants .OUTPUT_FILENAME_OPTION ,
+                new Java2WSDLCommandLineOption(Java2WSDLConstants .OUTPUT_FILENAME_OPTION ,
                         new String[]{getOutputWSDLName()})
         );
 

Modified: webservices/axis2/trunk/java/modules/tool/axis2-wsdl2code-maven-plugin/src/main/java/org/apache/axis2/maven2/wsdl2code/WSDL2CodeMojo.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/tool/axis2-wsdl2code-maven-plugin/src/main/java/org/apache/axis2/maven2/wsdl2code/WSDL2CodeMojo.java?view=diff&rev=560106&r1=560105&r2=560106
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/axis2-wsdl2code-maven-plugin/src/main/java/org/apache/axis2/maven2/wsdl2code/WSDL2CodeMojo.java (original)
+++ webservices/axis2/trunk/java/modules/tool/axis2-wsdl2code-maven-plugin/src/main/java/org/apache/axis2/maven2/wsdl2code/WSDL2CodeMojo.java Thu Jul 26 22:25:56 2007
@@ -41,6 +41,7 @@
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
+import java.util.Properties;
 
 
 /**
@@ -180,6 +181,83 @@
      */
     private boolean generateServerSideInterface = false;
 
+    /**
+     * @parameter expression="${axis2.wsdl2code.repositoryPath}"
+     */
+    private String repositoryPath = null;
+
+    /**
+     * @parameter expression="${axis2.wsdl2code.externalMapping}"
+     */
+    private String externalMapping = null;
+
+    /**
+     * @parameter expression="${axis2.wsdl2code.wsdlVersion}"
+     */
+    private String wsdlVersion = null;
+
+    /**
+     * @parameter expression="${axis2.wsdl2code.targetSourceFolderLocation}"
+     */
+    private String targetSourceFolderLocation = null;
+
+    /**
+     * @parameter expression="${axis2.wsdl2code.targetResourcesFolderLocation}"
+     */
+    private String targetResourcesFolderLocation = null;
+
+    /**
+     * @parameter expression="${axis2.wsdl2code.unwrap}" default-value="false" *
+     */
+    private boolean unwrap = false;
+
+    /**
+     * @parameter expression="${axis2.wsdl2code.allPorts}" default-value="false" *
+     */
+    private boolean allPorts = false;
+
+    /**
+     * @parameter expression="${axis2.wsdl2code.backwardCompatible}" default-value="false" *
+     */
+    private boolean backwardCompatible = false;
+
+    /**
+     * @parameter expression="${axis2.wsdl2code.flattenFiles}" default-value="false" *
+     */
+    private boolean flattenFiles = false;
+
+    /**
+     * @parameter expression="${axis2.wsdl2code.skipMessageReceiver}" default-value="false" *
+     */
+    private boolean skipMessageReceiver = false;
+
+    /**
+     * @parameter expression="${axis2.wsdl2code.skipBuildXML}" default-value="false" *
+     */
+    private boolean skipBuildXML = false;
+
+    /**
+     * @parameter expression="${axis2.wsdl2code.skipWSDL}" default-value="false" *
+     */
+    private boolean skipWSDL = false;
+
+    /**
+     * @parameter expression="${axis2.wsdl2code.overWrite}" default-value="false" *
+     */
+    private boolean overWrite = false;
+
+    /**
+     * @parameter expression="${axis2.wsdl2code.suppressPrefixes}" default-value="false" *
+     */
+    private boolean suppressPrefixes = false;
+
+    /**
+     * Specify databinding specific extra options
+     *
+     * @parameter expression="${axis2.java2wsdl.options}"
+     */
+    private Properties options;
+
     /** @parameter expression="${axis2.wsdl2code.namespaceToPackages}" */
     private String namespaceToPackages = null;
 
@@ -351,6 +429,131 @@
                             CommandLineOptionConstants.WSDL2JavaConstants.SERVER_SIDE_INTERFACE_OPTION,
                             new String[0]));
         }
+
+        if (unwrap) {
+            optionMap.put(
+                    CommandLineOptionConstants.WSDL2JavaConstants.UNWRAP_PARAMETERS,
+                    new CommandLineOption(
+                            CommandLineOptionConstants.WSDL2JavaConstants.UNWRAP_PARAMETERS,
+                            new String[0]));
+        }
+
+        if (allPorts) {
+            optionMap.put(
+                    CommandLineOptionConstants.WSDL2JavaConstants.All_PORTS_OPTION,
+                    new CommandLineOption(
+                            CommandLineOptionConstants.WSDL2JavaConstants.All_PORTS_OPTION,
+                            new String[0]));
+        }
+
+        if (backwardCompatible) {
+            optionMap.put(
+                    CommandLineOptionConstants.WSDL2JavaConstants.BACKWORD_COMPATIBILITY_OPTION,
+                    new CommandLineOption(
+                            CommandLineOptionConstants.WSDL2JavaConstants.BACKWORD_COMPATIBILITY_OPTION,
+                            new String[0]));
+        }
+
+        if (flattenFiles) {
+            optionMap.put(
+                    CommandLineOptionConstants.WSDL2JavaConstants.FLATTEN_FILES_OPTION,
+                    new CommandLineOption(
+                            CommandLineOptionConstants.WSDL2JavaConstants.FLATTEN_FILES_OPTION,
+                            new String[0]));
+        }
+
+        if (skipMessageReceiver) {
+            optionMap.put(
+                    CommandLineOptionConstants.WSDL2JavaConstants.NO_MESSAGE_RECEIVER_OPTION_LONG,
+                    new CommandLineOption(
+                            CommandLineOptionConstants.WSDL2JavaConstants.NO_MESSAGE_RECEIVER_OPTION_LONG,
+                            new String[0]));
+        }
+
+        if (skipBuildXML) {
+            optionMap.put(
+                    CommandLineOptionConstants.WSDL2JavaConstants.NO_BUILD_XML_OPTION_LONG,
+                    new CommandLineOption(
+                            CommandLineOptionConstants.WSDL2JavaConstants.NO_BUILD_XML_OPTION_LONG,
+                            new String[0]));
+        }
+
+        if (skipWSDL) {
+            optionMap.put(
+                    CommandLineOptionConstants.WSDL2JavaConstants.NO_WSDLS_OPTION_LONG,
+                    new CommandLineOption(
+                            CommandLineOptionConstants.WSDL2JavaConstants.NO_WSDLS_OPTION_LONG,
+                            new String[0]));
+        }
+
+        if (overWrite) {
+            optionMap.put(
+                    CommandLineOptionConstants.WSDL2JavaConstants.OVERRIDE_OPTION,
+                    new CommandLineOption(
+                            CommandLineOptionConstants.WSDL2JavaConstants.OVERRIDE_OPTION,
+                            new String[0]));
+        }
+
+        if (suppressPrefixes) {
+            optionMap.put(
+                    CommandLineOptionConstants.WSDL2JavaConstants.SUPPRESS_PREFIXES_OPTION,
+                    new CommandLineOption(
+                            CommandLineOptionConstants.WSDL2JavaConstants.SUPPRESS_PREFIXES_OPTION,
+                            new String[0]));
+        }
+
+        if (repositoryPath != null) {
+            optionMap.put(
+                    CommandLineOptionConstants.WSDL2JavaConstants.REPOSITORY_PATH_OPTION,
+                    new CommandLineOption(
+                            CommandLineOptionConstants.WSDL2JavaConstants.REPOSITORY_PATH_OPTION,
+                            new String[]{repositoryPath}));
+        }
+
+        if (externalMapping != null) {
+            optionMap.put(
+                    CommandLineOptionConstants.WSDL2JavaConstants.EXTERNAL_MAPPING_OPTION,
+                    new CommandLineOption(
+                            CommandLineOptionConstants.WSDL2JavaConstants.EXTERNAL_MAPPING_OPTION,
+                            new String[]{externalMapping}));
+        }
+
+        if (wsdlVersion != null) {
+            optionMap.put(
+                    CommandLineOptionConstants.WSDL2JavaConstants.WSDL_VERSION_OPTION,
+                    new CommandLineOption(
+                            CommandLineOptionConstants.WSDL2JavaConstants.WSDL_VERSION_OPTION,
+                            new String[]{wsdlVersion}));
+        }
+
+        if (targetSourceFolderLocation != null) {
+            optionMap.put(
+                    CommandLineOptionConstants.WSDL2JavaConstants.SOURCE_FOLDER_NAME_OPTION,
+                    new CommandLineOption(
+                            CommandLineOptionConstants.WSDL2JavaConstants.SOURCE_FOLDER_NAME_OPTION,
+                            new String[]{targetSourceFolderLocation}));
+        }
+
+        if (targetResourcesFolderLocation != null) {
+            optionMap.put(
+                    CommandLineOptionConstants.WSDL2JavaConstants.RESOURCE_FOLDER_OPTION,
+                    new CommandLineOption(
+                            CommandLineOptionConstants.WSDL2JavaConstants.RESOURCE_FOLDER_OPTION,
+                            new String[]{targetResourcesFolderLocation}));
+        }
+
+        Iterator iterator = options.entrySet().iterator();
+        while (iterator.hasNext()) {
+            Map.Entry entry = (Map.Entry) iterator.next();
+            String key = CommandLineOptionConstants.WSDL2JavaConstants.EXTRA_OPTIONTYPE_PREFIX + entry.getKey();
+            String value = (String) entry.getValue();
+            optionMap.put(
+                    key,
+                    new CommandLineOption(
+                            key,
+                            new String[]{value}));
+        }
+
         optionMap.put(
                 CommandLineOptionConstants.WSDL2JavaConstants.SERVICE_NAME_OPTION,
                 new CommandLineOption(

Modified: webservices/axis2/trunk/java/modules/xmlbeans/src/org/apache/axis2/xmlbeans/CodeGenerationUtility.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/xmlbeans/src/org/apache/axis2/xmlbeans/CodeGenerationUtility.java?view=diff&rev=560106&r1=560105&r2=560106
==============================================================================
--- webservices/axis2/trunk/java/modules/xmlbeans/src/org/apache/axis2/xmlbeans/CodeGenerationUtility.java (original)
+++ webservices/axis2/trunk/java/modules/xmlbeans/src/org/apache/axis2/xmlbeans/CodeGenerationUtility.java Thu Jul 26 22:25:56 2007
@@ -28,6 +28,7 @@
 import org.apache.axis2.wsdl.WSDLConstants;
 import org.apache.axis2.wsdl.WSDLUtil;
 import org.apache.axis2.wsdl.codegen.CodeGenConfiguration;
+import org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension;
 import org.apache.axis2.wsdl.databinding.DefaultTypeMapper;
 import org.apache.axis2.wsdl.databinding.JavaTypeMapper;
 import org.apache.axis2.wsdl.databinding.TypeMapper;
@@ -174,6 +175,7 @@
                     .toArray(new XmlSchema[completeSchemaList.size()]));
             er.setBaseUri(cgconfig.getBaseURI());
 
+            String xsdConfigFile = (String)cgconfig.getProperties().get(XMLBeansExtension.XSDCONFIG_OPTION);
 
             sts = XmlBeans.compileXmlBeans(
                     // set the STS name; defaults to null, which makes the generated class
@@ -182,7 +184,7 @@
                     null,
                     convertToSchemaArray(topLevelSchemaList),
                     new Axis2BindingConfig(cgconfig.getUri2PackageNameMap(),
-                                           cgconfig.getXsdConfigFile()),
+                                           xsdConfigFile),
                     XmlBeans.getContextTypeLoader(),
                     new Axis2Filer(cgconfig),
                     new XmlOptions().setEntityResolver(er));



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message