You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by aj...@apache.org on 2006/01/04 06:07:48 UTC

svn commit: r365826 - in /webservices/axis2/trunk/java/modules: codegen/src/org/apache/axis2/schema/ codegen/src/org/apache/axis2/schema/i18n/ codegen/src/org/apache/axis2/schema/writer/ codegen/src/org/apache/axis2/wsdl/ codegen/src/org/apache/axis2/w...

Author: ajith
Date: Tue Jan  3 21:07:18 2006
New Revision: 365826

URL: http://svn.apache.org/viewcvs?rev=365826&view=rev
Log:
Added I18n support for both the ADB classes and the Codegen classe
1. Added resource.properties files and the relevant Message classes
2. Updated all other necessary classes to depend on the messages from resource bundles

Added:
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/schema/i18n/
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/schema/i18n/SchemaCompilerMessages.java
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/schema/i18n/resource.properties
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/i18n/
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/i18n/CodegenMessages.java
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/i18n/resource.properties
Modified:
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/schema/CompilerOptions.java
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/schema/SchemaCompiler.java
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/schema/XSD2Java.java
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/schema/writer/JavaBeanWriter.java
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/WSDL2Code.java
    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/CodeGenerationEngine.java
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/XSLTIncludeResolver.java
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/MultiLanguageClientEmitter.java
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/AxisBindingBuilder.java
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/DefaultDatabindingExtension.java
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/WSDLValidatorExtension.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/codegen/writer/ClassWriter.java
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/util/ConfigPropertyFileLoader.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPTransportUtils.java

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/schema/CompilerOptions.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/schema/CompilerOptions.java?rev=365826&r1=365825&r2=365826&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/schema/CompilerOptions.java (original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/schema/CompilerOptions.java Tue Jan  3 21:07:18 2006
@@ -1,5 +1,7 @@
 package org.apache.axis2.schema;
 
+import org.apache.axis2.schema.i18n.SchemaCompilerMessages;
+
 import java.io.File;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
@@ -71,7 +73,7 @@
         if (packageName != null && testValue(packageName)) {
             this.packageName = packageName;
         } else {
-            throw new RuntimeException("Unsupported value!");
+            throw new RuntimeException(SchemaCompilerMessages.getMessage("schema.unsupportedvalue"));
         }
         return this;
     }

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/schema/SchemaCompiler.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/schema/SchemaCompiler.java?rev=365826&r1=365825&r2=365826&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/schema/SchemaCompiler.java (original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/schema/SchemaCompiler.java Tue Jan  3 21:07:18 2006
@@ -3,6 +3,7 @@
 import org.apache.axis2.om.OMElement;
 import org.apache.axis2.schema.util.SchemaPropertyLoader;
 import org.apache.axis2.schema.writer.BeanWriter;
+import org.apache.axis2.schema.i18n.SchemaCompilerMessages;
 import org.apache.ws.commons.schema.XmlSchema;
 import org.apache.ws.commons.schema.XmlSchemaAll;
 import org.apache.ws.commons.schema.XmlSchemaAny;
@@ -432,7 +433,7 @@
 
         if (complexType.getContentModel()!=null){
             //for the time being we cannot deal with these content. so throw an exception
-            throw new RuntimeException("Unsupported content! ");
+            throw new RuntimeException(SchemaCompilerMessages.getMessage("schema.unsupportedcontenterror"));
         }
 
         // Process the other types - Say the complex content, extensions and so on

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/schema/XSD2Java.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/schema/XSD2Java.java?rev=365826&r1=365825&r2=365826&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/schema/XSD2Java.java (original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/schema/XSD2Java.java Tue Jan  3 21:07:18 2006
@@ -2,6 +2,7 @@
 
 import org.apache.ws.commons.schema.XmlSchema;
 import org.apache.ws.commons.schema.XmlSchemaCollection;
+import org.apache.axis2.schema.i18n.SchemaCompilerMessages;
 import org.w3c.dom.Document;
 
 import javax.xml.parsers.DocumentBuilder;
@@ -35,8 +36,8 @@
     public static void main(String[] args) {
         if (args.length != 2) {
             // printout the options
-            System.out.println("Argument1 - Source schema file name");
-            System.out.println("Argument2 - Output folder name");
+            System.out.println(SchemaCompilerMessages.getMessage("schema.xsdarg1"));
+            System.out.println(SchemaCompilerMessages.getMessage("schema.xsdarg2"));
         } else {
             compile(args[0], args[1]);
         }
@@ -64,7 +65,7 @@
             File outputFolder = new File(outputLocation);
             if (outputFolder.exists()) {
                 if (outputFolder.isFile()) {
-                    throw new IOException("specified location is not a folder!");
+                    throw new IOException(SchemaCompilerMessages.getMessage("schema.locationNotFolder"));
                 }
             } else {
                 outputFolder.mkdirs();
@@ -83,7 +84,7 @@
             compiler.compile(currentSchema);
 
         } catch (Exception e) {
-            throw new RuntimeException("Compiler caused an exception", e);
+            throw new RuntimeException(SchemaCompilerMessages.getMessage("schema.compilerexception"), e);
         }
     }
 }

Added: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/schema/i18n/SchemaCompilerMessages.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/schema/i18n/SchemaCompilerMessages.java?rev=365826&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/schema/i18n/SchemaCompilerMessages.java (added)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/schema/i18n/SchemaCompilerMessages.java Tue Jan  3 21:07:18 2006
@@ -0,0 +1,162 @@
+package org.apache.axis2.schema.i18n;
+
+import org.apache.axis2.i18n.Messages;
+import org.apache.axis2.i18n.MessagesConstants;
+import org.apache.axis2.i18n.MessageBundle;
+
+import java.util.Locale;
+import java.util.ResourceBundle;
+import java.util.MissingResourceException;
+
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @see Messages. The implementation is the same but just the thisClass static reference
+ * has SchemaCompilerMessages.class
+ */
+public class SchemaCompilerMessages {
+
+    private static Class thisClass = SchemaCompilerMessages.class;
+
+    private static final String projectName = MessagesConstants.projectName;
+
+    private static final String resourceName = MessagesConstants.resourceName;
+    private static final Locale locale = MessagesConstants.locale;
+
+    private static final String packageName = getPackage(thisClass.getName());
+    private static final ClassLoader classLoader = thisClass.getClassLoader();
+
+    private static final ResourceBundle parent =
+            (MessagesConstants.rootPackageName.equals(packageName))
+            ? null
+            : MessagesConstants.rootBundle;
+
+
+    /**
+     * ** NO NEED TO CHANGE ANYTHING BELOW ****
+     */
+
+    private static final MessageBundle messageBundle =
+            new MessageBundle(projectName, packageName, resourceName,
+                    locale, classLoader, parent);
+
+    /**
+     * Get a message from resource.properties from the package of the given object.
+     *
+     * @param key The resource key
+     * @return The formatted message
+     */
+    public static String getMessage(String key)
+            throws MissingResourceException {
+        return messageBundle.getMessage(key);
+    }
+
+    /**
+     * Get a message from resource.properties from the package of the given object.
+     *
+     * @param key  The resource key
+     * @param arg0 The argument to place in variable {0}
+     * @return The formatted message
+     */
+    public static String getMessage(String key, String arg0)
+            throws MissingResourceException {
+        return messageBundle.getMessage(key, arg0);
+    }
+
+    /**
+     * Get a message from resource.properties from the package of the given object.
+     *
+     * @param key  The resource key
+     * @param arg0 The argument to place in variable {0}
+     * @param arg1 The argument to place in variable {1}
+     * @return The formatted message
+     */
+    public static String getMessage(String key, String arg0, String arg1)
+            throws MissingResourceException {
+        return messageBundle.getMessage(key, arg0, arg1);
+    }
+
+    /**
+     * Get a message from resource.properties from the package of the given object.
+     *
+     * @param key  The resource key
+     * @param arg0 The argument to place in variable {0}
+     * @param arg1 The argument to place in variable {1}
+     * @param arg2 The argument to place in variable {2}
+     * @return The formatted message
+     */
+    public static String getMessage(String key, String arg0, String arg1, String arg2)
+            throws MissingResourceException {
+        return messageBundle.getMessage(key, arg0, arg1, arg2);
+    }
+
+    /**
+     * Get a message from resource.properties from the package of the given object.
+     *
+     * @param key  The resource key
+     * @param arg0 The argument to place in variable {0}
+     * @param arg1 The argument to place in variable {1}
+     * @param arg2 The argument to place in variable {2}
+     * @param arg3 The argument to place in variable {3}
+     * @return The formatted message
+     */
+    public static String getMessage(String key, String arg0, String arg1, String arg2, String arg3)
+            throws MissingResourceException {
+        return messageBundle.getMessage(key, arg0, arg1, arg2, arg3);
+    }
+
+    /**
+     * Get a message from resource.properties from the package of the given object.
+     *
+     * @param key  The resource key
+     * @param arg0 The argument to place in variable {0}
+     * @param arg1 The argument to place in variable {1}
+     * @param arg2 The argument to place in variable {2}
+     * @param arg3 The argument to place in variable {3}
+     * @param arg4 The argument to place in variable {4}
+     * @return The formatted message
+     */
+    public static String getMessage(String key, String arg0, String arg1, String arg2, String arg3, String arg4)
+            throws MissingResourceException {
+        return messageBundle.getMessage(key, arg0, arg1, arg2, arg3, arg4);
+    }
+
+    /**
+     * Get a message from resource.properties from the package of the given object.
+     *
+     * @param key  The resource key
+     * @param args An array of objects to place in corresponding variables
+     * @return The formatted message
+     */
+    public static String getMessage(String key, String[] args)
+            throws MissingResourceException {
+        return messageBundle.getMessage(key, args);
+    }
+
+    public static ResourceBundle getResourceBundle() {
+        return messageBundle.getResourceBundle();
+    }
+
+    public static MessageBundle getMessageBundle() {
+        return messageBundle;
+    }
+
+    private static String getPackage(String name) {
+        return name.substring(0, name.lastIndexOf('.')).intern();
+    }
+
+}

Added: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/schema/i18n/resource.properties
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/schema/i18n/resource.properties?rev=365826&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/schema/i18n/resource.properties (added)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/schema/i18n/resource.properties Tue Jan  3 21:07:18 2006
@@ -0,0 +1,31 @@
+# Translation instructions.
+# 1.  Each message line is of the form key=value.
+#     Translate the value, DO NOT translate the key.
+# 2.  The messages may contain arguments that will be filled in
+#     by the runtime.  These are of the form: {0}, {1}, etc.
+#     These must appear as is in the message, though the order
+#     may be changed to support proper language syntax.
+# 3.  If a single quote character is to appear in the resulting
+#     message, it must appear in this file as two consecutive
+#     single quote characters.
+# 4.  Lines beginning with "#" (like this one) are comment lines
+#     and may contain translation instructions.  They need not be
+#     translated unless your translated file, rather than this file,
+#     will serve as a base for other translators.
+################## XSD2java #################################################
+schema.xsdarg1=Argument1 - Source schema file name
+schema.xsdarg2=Argument2 - Output folder name
+schema.locationNotFolder=specified location is not a folder!
+schema.compilerexception=Compiler caused an exception
+
+###################Schema compiler ###########################################
+schema.unsupportedcontenterror=Unsupported content!
+
+################## Options ###################################################
+schema.unsupportedvalue=Unsupported value!
+
+################## Java bean writer ###########################################
+schema.rootnotfolderexception=Root location needs to be a directory!
+schema.notimplementedxception=Not implemented yet
+schema.templateLoadException=Error loading the template
+schema.templateNotFoundException=template for this writer is not found
\ No newline at end of file

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/schema/writer/JavaBeanWriter.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/schema/writer/JavaBeanWriter.java?rev=365826&r1=365825&r2=365826&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/schema/writer/JavaBeanWriter.java (original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/schema/writer/JavaBeanWriter.java Tue Jan  3 21:07:18 2006
@@ -3,6 +3,7 @@
 import org.apache.axis2.schema.BeanWriterMetaInfoHolder;
 import org.apache.axis2.schema.CompilerOptions;
 import org.apache.axis2.schema.SchemaCompilationException;
+import org.apache.axis2.schema.i18n.SchemaCompilerMessages;
 import org.apache.axis2.schema.util.SchemaPropertyLoader;
 import org.apache.axis2.util.JavaUtils;
 import org.apache.axis2.util.URLProcessor;
@@ -193,7 +194,7 @@
      * @see BeanWriter#write(org.apache.ws.commons.schema.XmlSchemaSimpleType, java.util.Map, org.apache.axis2.schema.BeanWriterMetaInfoHolder)
      */
     public String write(XmlSchemaSimpleType simpleType, Map typeMap, BeanWriterMetaInfoHolder metainf) throws SchemaCompilationException {
-        throw new SchemaCompilationException("Not implemented yet");
+        throw new SchemaCompilationException(SchemaCompilerMessages.getMessage("schema.notimplementedxception"));
     }
 
     /**
@@ -205,7 +206,7 @@
         if (rootDir == null) {
             this.rootDir = new File(".");
         } else if (!rootDir.isDirectory()) {
-            throw new IOException("Root location needs to be a directory!");
+            throw new IOException(SchemaCompilerMessages.getMessage("schema.rootnotfolderexception"));
         } else {
             this.rootDir = rootDir;
         }
@@ -449,10 +450,10 @@
                 templateCache = TransformerFactory.newInstance().newTemplates(new StreamSource(xslStream));
                 templateLoaded = true;
             } catch (TransformerConfigurationException e) {
-                throw new SchemaCompilationException("Error loading the template", e);
+                throw new SchemaCompilationException(SchemaCompilerMessages.getMessage("schema.templateLoadException"), e);
             }
         } else {
-            throw new SchemaCompilationException("template for this writer is not found");
+            throw new SchemaCompilationException(SchemaCompilerMessages.getMessage("schema.templateNotFoundException"));
         }
     }
 

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/WSDL2Code.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/WSDL2Code.java?rev=365826&r1=365825&r2=365826&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/WSDL2Code.java (original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/WSDL2Code.java Tue Jan  3 21:07:18 2006
@@ -19,6 +19,8 @@
 import org.apache.axis2.wsdl.codegen.CodeGenerationEngine;
 import org.apache.axis2.wsdl.codegen.CommandLineOptionConstants;
 import org.apache.axis2.wsdl.codegen.CommandLineOptionParser;
+import org.apache.axis2.wsdl.codegen.CodeGenConfiguration;
+import org.apache.axis2.wsdl.i18n.CodegenMessages;
 
 public class WSDL2Code {
 
@@ -32,26 +34,18 @@
     }
 
     private static void printUsage() {
-        System.out.println(
-                "Usage WSDL2Code -uri <Location of WSDL> : WSDL file location ");
-        System.out.println(
-                "-o <output Location> : output file location ");
-        System.out.println(
-                "-a : Generate async style code only. Default is off");
-        System.out.println(
-                "-s : Generate sync style code only. Default is off. takes precedence over -a");
-        System.out.println(
-                "-p <package name> : set custom package name");
-        System.out.println(
-                "-l <language> : valid languages are java and csharp. Default is java");
-        System.out.println(
-                "-t : Generate TestCase to test the generated code");
-        System.out.println(
-                "-ss : Generate server side code (i.e. skeletons). Default is off");
-        System.out.println(
-                "-sd : Generate service descriptor (i.e. axis2.xml). Default is off. Valid with -ss ");
-        System.out.println(
-                "-d <databinding> : valid databinding(s) are adb and xmlbeans. Default is adb");
+        
+        System.out.println(CodegenMessages.getMessage("wsdl2code.arg1"));
+        System.out.println(CodegenMessages.getMessage("wsdl2code.arg2"));
+        System.out.println(CodegenMessages.getMessage("wsdl2code.arg3"));
+        System.out.println(CodegenMessages.getMessage("wsdl2code.arg4"));
+        System.out.println(CodegenMessages.getMessage("wsdl2code.arg5"));
+        System.out.println(CodegenMessages.getMessage("wsdl2code.arg6"));
+        System.out.println(CodegenMessages.getMessage("wsdl2code.arg7"));
+        System.out.println(CodegenMessages.getMessage("wsdl2code.arg8"));
+        System.out.println(CodegenMessages.getMessage("wsdl2code.arg9"));
+        System.out.println(CodegenMessages.getMessage("wsdl2code.arg10"));
+
         System.exit(0);
     }
 

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/CodeGenConfiguration.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/CodeGenConfiguration.java?rev=365826&r1=365825&r2=365826&view=diff
==============================================================================
--- 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 Tue Jan  3 21:07:18 2006
@@ -18,6 +18,7 @@
 
 import org.apache.axis2.wsdl.databinding.TypeMapper;
 import org.apache.axis2.wsdl.util.ConfigPropertyFileLoader;
+import org.apache.axis2.wsdl.i18n.CodegenMessages;
 import org.apache.wsdl.WSDLDescription;
 
 import java.io.File;
@@ -222,7 +223,7 @@
         //check and create the directories
         if (this.outputLocation.exists()) {
             if (this.outputLocation.isFile()) {
-                throw new RuntimeException("The specified output location is not a directory!");
+                throw new RuntimeException(CodegenMessages.getMessage("options.notADirectoryException"));
             }
         } else {
             this.outputLocation.mkdirs();

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/CodeGenerationEngine.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/CodeGenerationEngine.java?rev=365826&r1=365825&r2=365826&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/CodeGenerationEngine.java (original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/CodeGenerationEngine.java Tue Jan  3 21:07:18 2006
@@ -21,10 +21,10 @@
 import org.apache.axis2.wsdl.codegen.extension.CodeGenExtension;
 import org.apache.axis2.wsdl.databinding.TypeMapper;
 import org.apache.axis2.wsdl.util.ConfigPropertyFileLoader;
+import org.apache.axis2.wsdl.i18n.CodegenMessages;
 import org.apache.wsdl.WSDLDescription;
 
 import javax.wsdl.WSDLException;
-import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
@@ -45,9 +45,7 @@
         try {
             wom = this.getWOM(parser);
         } catch (WSDLException e) {
-            throw new CodeGenerationException("Error parsing WSDL", e);
-        } catch (IOException e1) {
-            throw new CodeGenerationException("Invalid WSDL Location ", e1);
+            throw new CodeGenerationException(CodegenMessages.getMessage("engine.wsdlParsingException"), e);
         }
 
         configuration = new CodeGenConfiguration(wom, parser);
@@ -83,9 +81,9 @@
             if (mapper == null) {
                 // this check is redundant here. The default databinding extension should
                 // have already figured this out and thrown an error message. However in case the
-                // users mess with the config it is safe to keep this check in order to throw
+                // users decides to mess with the config it is safe to keep this check in order to throw
                 // a meaningful error message
-                throw new CodeGenerationException("No proper databinding has taken place");
+                throw new CodeGenerationException(CodegenMessages.getMessage("engine.noProperDatabindingException"));
             }
 
             Map emitterMap = ConfigPropertyFileLoader.getLanguageEmitterMap();
@@ -95,7 +93,7 @@
                 emitter.setCodeGenConfiguration(configuration);
                 emitter.setMapper(mapper);
             } else {
-                throw new Exception("Emitter class not found!");
+                throw new Exception(CodegenMessages.getMessage("engine.emitterMissing"));
             }
 
 
@@ -108,7 +106,7 @@
             }
 
         } catch (ClassCastException e) {
-            throw new CodeGenerationException("Non emitter class found!", e);
+            throw new CodeGenerationException(CodegenMessages.getMessage("engine.wrongEmitter"), e);
 
         } catch (Exception e) {
             throw new CodeGenerationException(e);
@@ -118,11 +116,9 @@
     }
 
 
-    private WSDLDescription getWOM(CommandLineOptionParser parser) throws WSDLException,
-            IOException {
+    private WSDLDescription getWOM(CommandLineOptionParser parser) throws WSDLException{
         String uri = ((CommandLineOption) parser.getAllOptions().get(
                 CommandLineOptionConstants.WSDL_LOCATION_URI_OPTION)).getOptionValue();
-        //todo check the wsdl URI here
         return WOMBuilderFactory.getBuilder(org.apache.wsdl.WSDLConstants.WSDL_1_1).build(uri)
                 .getDescription();
     }
@@ -139,11 +135,11 @@
             Class extensionClass = getClass().getClassLoader().loadClass(className);
             return extensionClass.newInstance();
         } catch (ClassNotFoundException e) {
-            throw new CodeGenerationException("Extension class loading problem", e);
+            throw new CodeGenerationException(CodegenMessages.getMessage("engine.extensionLoadProblem"), e);
         } catch (InstantiationException e) {
-            throw new CodeGenerationException("Extension class instantiation problem", e);
+            throw new CodeGenerationException(CodegenMessages.getMessage("engine.extensionInstantiationProblem"), e);
         } catch (IllegalAccessException e) {
-            throw new CodeGenerationException("Illegal extension!", e);
+            throw new CodeGenerationException(CodegenMessages.getMessage("engine.illegalExtension"), e);
         } catch (Exception e) {
             throw new CodeGenerationException(e);
         }

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/XSLTIncludeResolver.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/XSLTIncludeResolver.java?rev=365826&r1=365825&r2=365826&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/XSLTIncludeResolver.java (original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/XSLTIncludeResolver.java Tue Jan  3 21:07:18 2006
@@ -1,6 +1,7 @@
 package org.apache.axis2.wsdl.codegen;
 
 import org.apache.axis2.wsdl.util.ConfigPropertyFileLoader;
+import org.apache.axis2.wsdl.i18n.CodegenMessages;
 
 import javax.xml.transform.URIResolver;
 import javax.xml.transform.Source;
@@ -68,7 +69,7 @@
             supporterTemplateStream = getClass().getResourceAsStream(templateName);
             return new StreamSource(supporterTemplateStream);
         } else{
-            throw new TransformerException(templateName + " template not found!");
+            throw new TransformerException(CodegenMessages.getMessage("reslover.templateNotFound",templateName));
         }
     }
 

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/MultiLanguageClientEmitter.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/MultiLanguageClientEmitter.java?rev=365826&r1=365825&r2=365826&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/MultiLanguageClientEmitter.java (original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/MultiLanguageClientEmitter.java Tue Jan  3 21:07:18 2006
@@ -32,6 +32,7 @@
 import org.apache.axis2.wsdl.codegen.writer.SkeletonWriter;
 import org.apache.axis2.wsdl.codegen.writer.TestClassWriter;
 import org.apache.axis2.wsdl.databinding.TypeMapper;
+import org.apache.axis2.wsdl.i18n.CodegenMessages;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.wsdl.MessageReference;
@@ -125,7 +126,8 @@
             } else if (codegenStyle == XSLTConstants.CodegenStyle.AUTOMATIC) {
                 emitSkeletonAutomatic(wom);
             } else {
-                throw new Exception("Unknown code generation style!!! " + codegenStyle);
+                throw new Exception(
+                         CodegenMessages.getMessage("emitter.unknownStyle", codegenStyle+"")) ;
             }
 
             // Call the emit stub method to generate the client side too
@@ -154,7 +156,7 @@
             } else if (codegenStyle == XSLTConstants.CodegenStyle.AUTOMATIC) {
                 emitStubAutomatic(wom);
             } else {
-                throw new Exception("Unknown code generation style!!! " + codegenStyle);
+                throw new Exception( CodegenMessages.getMessage("emitter.unknownStyle", codegenStyle+""));
             }
 
         } catch (Exception e) {
@@ -183,8 +185,8 @@
         }
 
 
-        log.info("Interface mode is selected.The following items will not be generated");
-        log.info("1. Message Receiver");
+        log.info(CodegenMessages.getMessage("emitter.logEntryInterface1"));
+        log.info(CodegenMessages.getMessage("emitter.logEntryInterface2"));
     }
 
     /**
@@ -197,7 +199,7 @@
         if (bindings == null || bindings.isEmpty()) {
             //asking for a code generation with a binding when a binding is
             //not present should be the cause of an Exception !
-            throw new Exception("Cannot find a binding!!");
+            throw new Exception(CodegenMessages.getMessage("emitter.cannotFindBinding"));
 
         } else {
             WSDLBinding axisBinding;
@@ -262,11 +264,12 @@
         }
 
         //log the message stating that the binding dependent parts are not generated
-        log.info("Interface code generation was selected! The following items are not generated");
-        log.info("1. Stub");
-        log.info("2. CallbackHandler");
-        log.info("3. Test Classes");
-        log.info("4. Databinding Supporters");
+         log.info(CodegenMessages.getMessage("emitter.logEntryInterface1"));
+         log.info(CodegenMessages.getMessage("emitter.logEntryInterface3"));
+         log.info(CodegenMessages.getMessage("emitter.logEntryInterface4"));
+         log.info(CodegenMessages.getMessage("emitter.logEntryInterface5"));
+         log.info(CodegenMessages.getMessage("emitter.logEntryInterface6"));
+
     }
 
     /**
@@ -280,7 +283,7 @@
         if (bindings == null || bindings.isEmpty()) {
             //asking for a code generation with a binding when a binding is
             //not present should be the cause of an Exception !
-            throw new Exception("Cannot find a binding!!");
+            throw new Exception(CodegenMessages.getMessage("emitter.cannotFindBinding"));
         } else {
             WSDLBinding axisBinding;
             WSDLService axisService = null;
@@ -382,7 +385,7 @@
                 axisService = (WSDLService) services.values().toArray()[0];
             } else {
                 throw new UnsupportedOperationException(
-                        "Single service WSDL files only");
+                       CodegenMessages.getMessage("emitter.SingleServiceMessage"));
             }
         }
         return axisService;

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/AxisBindingBuilder.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/AxisBindingBuilder.java?rev=365826&r1=365825&r2=365826&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/AxisBindingBuilder.java (original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/AxisBindingBuilder.java Tue Jan  3 21:07:18 2006
@@ -21,6 +21,7 @@
 import org.apache.wsdl.WSDLExtensibilityAttribute;
 import org.apache.wsdl.WSDLExtensibilityElement;
 import org.apache.wsdl.WSDLInterface;
+import org.apache.axis2.wsdl.i18n.CodegenMessages;
 
 import javax.xml.namespace.QName;
 import java.util.Collection;
@@ -31,7 +32,7 @@
 /**
  * The purpose of this extension is to build the bindings. Bindings, however, may not be present.
  */
-public class AxisBindingBuilder extends AbstractCodeGenerationExtension implements CodeGenExtension {
+public class AxisBindingBuilder extends AbstractCodeGenerationExtension{
 
     public static final String AXIS_NAMESPACE = "http://ws.apache.org/axis2/";
 
@@ -50,7 +51,7 @@
         Vector bindingVector = new Vector();
 
         if (bindingMap == null || bindingMap.isEmpty()) {
-            log.info(" bindings are not present in the original document");
+            log.info(CodegenMessages.getMessage("extension.bindingMissing"));
             //just fall through
         } else {
             Collection bindingCollection = bindingMap.values();

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/DefaultDatabindingExtension.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/DefaultDatabindingExtension.java?rev=365826&r1=365825&r2=365826&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/DefaultDatabindingExtension.java (original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/DefaultDatabindingExtension.java Tue Jan  3 21:07:18 2006
@@ -32,7 +32,7 @@
 
             if (mappper == null) {
                 //this shouldn't happen
-                throw new CodeGenerationException("No proper databinding has taken place");
+                throw new CodeGenerationException("extension.noProperDatabinding");
             }
             return;
         }

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/WSDLValidatorExtension.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/WSDLValidatorExtension.java?rev=365826&r1=365825&r2=365826&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/WSDLValidatorExtension.java (original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/WSDLValidatorExtension.java Tue Jan  3 21:07:18 2006
@@ -17,6 +17,7 @@
 package org.apache.axis2.wsdl.codegen.extension;
 
 import org.apache.axis2.wsdl.codegen.CodeGenerationException;
+import org.apache.axis2.wsdl.i18n.CodegenMessages;
 import org.apache.wsdl.WSDLExtensibilityElement;
 import org.apache.wsdl.WSDLTypes;
 import org.apache.wsdl.extensions.ExtensionConstants;
@@ -67,7 +68,8 @@
                 }
                 if (!targetnamespaceFound)
                     throw new CodeGenerationException(
-                            "Invalid WSDL: The WSDL Types Schema does not define a targetNamespace in " + schema.getName());
+                            CodegenMessages.getMessage("extension.invalidWSDL",schema.getName().toString()));
+
             }
 
         }

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/XMLBeansExtension.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/XMLBeansExtension.java?rev=365826&r1=365825&r2=365826&view=diff
==============================================================================
--- 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 Tue Jan  3 21:07:18 2006
@@ -21,6 +21,7 @@
 import org.apache.axis2.wsdl.databinding.DefaultTypeMapper;
 import org.apache.axis2.wsdl.databinding.JavaTypeMapper;
 import org.apache.axis2.wsdl.util.ConfigPropertyFileLoader;
+import org.apache.axis2.wsdl.i18n.CodegenMessages;
 import org.apache.axis2.util.URLProcessor;
 import org.apache.wsdl.WSDLBinding;
 import org.apache.wsdl.WSDLBindingMessageReference;
@@ -299,7 +300,7 @@
 
             }
         } catch (Exception e) {
-            throw new RuntimeException("Additional schema loading failed!!", e);
+            throw new RuntimeException(CodegenMessages.getMessage("extension.additionalSchemaFailure"), e);
         }
 
         return schemaElements;
@@ -343,7 +344,7 @@
                     if (WSDLConstants.WSDL_USE_ENCODED.equals(
                             ((SOAPBody) element).getUse())) {
                         throw new RuntimeException(
-                                "The use 'encoded' is not supported!");
+                                CodegenMessages.getMessage("extension.encodedNotSupported"));
                     }
                 }
             }

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/writer/ClassWriter.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/writer/ClassWriter.java?rev=365826&r1=365825&r2=365826&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/writer/ClassWriter.java (original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/writer/ClassWriter.java Tue Jan  3 21:07:18 2006
@@ -22,6 +22,7 @@
 import org.apache.axis2.wsdl.codegen.CodeGenerationException;
 import org.apache.axis2.wsdl.codegen.XSLTIncludeResolver;
 import org.apache.axis2.wsdl.util.ConfigPropertyFileLoader;
+import org.apache.axis2.wsdl.i18n.CodegenMessages;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.w3c.dom.Document;
@@ -70,14 +71,14 @@
         Class clazz = this.getClass();
         Map languageSpecificPropertyMap = (Map) ConfigPropertyFileLoader.getLanguageSpecificPropertiesMap().get(this.language);
         if (languageSpecificPropertyMap == null) {
-            throw new CodeGenerationException("No language specific properties!!!");
+            throw new CodeGenerationException(CodegenMessages.getMessage("writer.noLangPropertiesExtension"));
         }
 
         String templateName = findTemplate(languageSpecificPropertyMap);
         if (templateName != null) {
             this.xsltStream = clazz.getResourceAsStream(templateName);
         } else {
-            throw new CodeGenerationException("template for this writer is not found");
+            throw new CodeGenerationException(CodegenMessages.getMessage("writer.templateMissing"));
         }
 
 

Added: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/i18n/CodegenMessages.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/i18n/CodegenMessages.java?rev=365826&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/i18n/CodegenMessages.java (added)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/i18n/CodegenMessages.java Tue Jan  3 21:07:18 2006
@@ -0,0 +1,161 @@
+package org.apache.axis2.wsdl.i18n;
+
+import org.apache.axis2.i18n.MessagesConstants;
+import org.apache.axis2.i18n.MessageBundle;
+
+import java.util.Locale;
+import java.util.ResourceBundle;
+import java.util.MissingResourceException;
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @see org.apache.axis2.i18n.Messages. The implementation is the same but just the thisClass static reference
+ * has CodegenMessages.class
+ */
+public class CodegenMessages {
+
+    //Only this changes from the original class
+    private static Class thisClass = CodegenMessages.class;
+
+    private static final String projectName = MessagesConstants.projectName;
+
+    private static final String resourceName = MessagesConstants.resourceName;
+    private static final Locale locale = MessagesConstants.locale;
+
+    private static final String packageName = getPackage(thisClass.getName());
+    private static final ClassLoader classLoader = thisClass.getClassLoader();
+
+    private static final ResourceBundle parent =
+            (MessagesConstants.rootPackageName.equals(packageName))
+                    ? null
+                    : MessagesConstants.rootBundle;
+
+
+    /**
+     * ** NO NEED TO CHANGE ANYTHING BELOW ****
+     */
+
+    private static final MessageBundle messageBundle =
+            new MessageBundle(projectName, packageName, resourceName,
+                    locale, classLoader, parent);
+
+    /**
+     * Get a message from resource.properties from the package of the given object.
+     *
+     * @param key The resource key
+     * @return The formatted message
+     */
+    public static String getMessage(String key)
+            throws MissingResourceException {
+        return messageBundle.getMessage(key);
+    }
+
+    /**
+     * Get a message from resource.properties from the package of the given object.
+     *
+     * @param key  The resource key
+     * @param arg0 The argument to place in variable {0}
+     * @return The formatted message
+     */
+    public static String getMessage(String key, String arg0)
+            throws MissingResourceException {
+        return messageBundle.getMessage(key, arg0);
+    }
+
+    /**
+     * Get a message from resource.properties from the package of the given object.
+     *
+     * @param key  The resource key
+     * @param arg0 The argument to place in variable {0}
+     * @param arg1 The argument to place in variable {1}
+     * @return The formatted message
+     */
+    public static String getMessage(String key, String arg0, String arg1)
+            throws MissingResourceException {
+        return messageBundle.getMessage(key, arg0, arg1);
+    }
+
+    /**
+     * Get a message from resource.properties from the package of the given object.
+     *
+     * @param key  The resource key
+     * @param arg0 The argument to place in variable {0}
+     * @param arg1 The argument to place in variable {1}
+     * @param arg2 The argument to place in variable {2}
+     * @return The formatted message
+     */
+    public static String getMessage(String key, String arg0, String arg1, String arg2)
+            throws MissingResourceException {
+        return messageBundle.getMessage(key, arg0, arg1, arg2);
+    }
+
+    /**
+     * Get a message from resource.properties from the package of the given object.
+     *
+     * @param key  The resource key
+     * @param arg0 The argument to place in variable {0}
+     * @param arg1 The argument to place in variable {1}
+     * @param arg2 The argument to place in variable {2}
+     * @param arg3 The argument to place in variable {3}
+     * @return The formatted message
+     */
+    public static String getMessage(String key, String arg0, String arg1, String arg2, String arg3)
+            throws MissingResourceException {
+        return messageBundle.getMessage(key, arg0, arg1, arg2, arg3);
+    }
+
+    /**
+     * Get a message from resource.properties from the package of the given object.
+     *
+     * @param key  The resource key
+     * @param arg0 The argument to place in variable {0}
+     * @param arg1 The argument to place in variable {1}
+     * @param arg2 The argument to place in variable {2}
+     * @param arg3 The argument to place in variable {3}
+     * @param arg4 The argument to place in variable {4}
+     * @return The formatted message
+     */
+    public static String getMessage(String key, String arg0, String arg1, String arg2, String arg3, String arg4)
+            throws MissingResourceException {
+        return messageBundle.getMessage(key, arg0, arg1, arg2, arg3, arg4);
+    }
+
+    /**
+     * Get a message from resource.properties from the package of the given object.
+     *
+     * @param key  The resource key
+     * @param args An array of objects to place in corresponding variables
+     * @return The formatted message
+     */
+    public static String getMessage(String key, String[] args)
+            throws MissingResourceException {
+        return messageBundle.getMessage(key, args);
+    }
+
+    public static ResourceBundle getResourceBundle() {
+        return messageBundle.getResourceBundle();
+    }
+
+    public static MessageBundle getMessageBundle() {
+        return messageBundle;
+    }
+
+    private static String getPackage(String name) {
+        return name.substring(0, name.lastIndexOf('.')).intern();
+    }
+
+}

Added: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/i18n/resource.properties
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/i18n/resource.properties?rev=365826&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/i18n/resource.properties (added)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/i18n/resource.properties Tue Jan  3 21:07:18 2006
@@ -0,0 +1,69 @@
+# Translation instructions.
+# 1.  Each message line is of the form key=value.
+#     Translate the value, DO NOT translate the key.
+# 2.  The messages may contain arguments that will be filled in
+#     by the runtime.  These are of the form: {0}, {1}, etc.
+#     These must appear as is in the message, though the order
+#     may be changed to support proper language syntax.
+# 3.  If a single quote character is to appear in the resulting
+#     message, it must appear in this file as two consecutive
+#     single quote characters.
+# 4.  Lines beginning with "#" (like this one) are comment lines
+#     and may contain translation instructions.  They need not be
+#     translated unless your translated file, rather than this file,
+#     will serve as a base for other translators.
+#
+################## WSDL2Code ######################################
+wsdl2code.arg1=Usage WSDL2Code -uri <Location of WSDL> : WSDL file location
+wsdl2code.arg2=-o <output Location> : output file location
+wsdl2code.arg3=-a : Generate async style code only. Default is off
+wsdl2code.arg4=-s : Generate sync style code only. Default is off. takes precedence over -a
+wsdl2code.arg5=-p <package name> : set custom package name
+wsdl2code.arg6=-l <language> : valid languages are java and csharp. Default is java
+wsdl2code.arg7=-t : Generate TestCase to test the generated code
+wsdl2code.arg8=-ss : Generate server side code (i.e. skeletons). Default is off
+wsdl2code.arg9=-sd : Generate service descriptor (i.e. axis2.xml). Default is off. Valid with -ss
+wsdl2code.arg10=-d <databinding> : valid databinding(s) are adb and xmlbeans. Default is adb
+
+################## prop file loader #################################
+propfileload.frameworkMismatch=Number of frameworks and extension names do not match!
+propfileload.unknownFramework=Unknown framework specified for default!
+propfileload.emitterMissing=No emitters found!
+propfileload.unknownDefaultLang=Unknown Language specified for default!
+propfileload.generalException=Exception while loading the property file
+
+#################  template resolver #################################
+reslover.templateNotFound={0} template not found!
+
+################### Codegen engine ###################################
+engine.wsdlParsingException=Error parsing WSDL
+engine.invalidWsdlLocation=Invalid WSDL Location
+engine.noProperDatabindingException=No proper databinding has taken place
+engine.emitterMissing=Emitter class not found!
+engine.wrongEmitter=Non emitter class found!
+engine.extensionLoadProblem=Extension class loading problem
+engine.extensionInstantiationProblem=Extension class instantiation problem
+engine.illegalExtension=Illegal extension!
+
+################### Options ###################################
+options.notADirectoryException=The specified output location is not a directory!
+
+writer.noLangPropertiesExtension=No language specific properties!!!
+writer.templateMissing=template for this writer is not found!
+
+extension.bindingMissing=bindings are not present in the original document
+extension.noProperDatabinding=No proper databinding has taken place
+extension.invalidWSDL=Invalid WSDL: The WSDL Types Schema does not define a targetNamespace in {0}
+extension.additionalSchemaFailure=Additional schema loading failed!!
+extension.encodedNotSupported=The use 'encoded' is not supported!
+
+emitter.unknownStyle=Unknown code generation style {0}
+emitter.cannotFindBinding=Cannot find a binding!!
+emitter.logEntryInterface1=Interface mode is selected.The following items will not be generated
+emitter.logEntryInterface2=1. Message Receiver
+emitter.logEntryInterface3=1. Stub
+emitter.logEntryInterface4=2. CallbackHandler
+emitter.logEntryInterface5=3. Test Classes
+emitter.logEntryInterface6=4. Databinding Supporters
+emitter.SingleServiceMessage=Single service WSDL files only
+

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/util/ConfigPropertyFileLoader.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/util/ConfigPropertyFileLoader.java?rev=365826&r1=365825&r2=365826&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/util/ConfigPropertyFileLoader.java (original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/util/ConfigPropertyFileLoader.java Tue Jan  3 21:07:18 2006
@@ -1,5 +1,7 @@
 package org.apache.axis2.wsdl.util;
 
+import org.apache.axis2.wsdl.i18n.CodegenMessages;
+
 import java.io.FileInputStream;
 import java.io.IOException;
 import java.io.InputStream;
@@ -87,7 +89,7 @@
                         databindingFrameworkNameToExtensionMap.put(databindingFrameworkNames[i], frameworkExtensionNames[i]);
                     }
                 } catch (ArrayIndexOutOfBoundsException e) {
-                    throw new Exception("Number of frameworks and extension names do not match!");
+                    throw new Exception(CodegenMessages.getMessage("propfileload.frameworkMismatch"));
                 }
 
             }
@@ -96,7 +98,7 @@
             tempString = props.getProperty(DATA_BINDING_FRAMEWORK_DEFAULT_NAME_KEY);
 
             if (tempString == null || !databindingFrameworkNameToExtensionMap.containsKey(tempString)) {
-                throw new Exception("Unknown framework specified for default!");
+                throw new Exception(CodegenMessages.getMessage("propfileload.unknownFramework"));
             }
             defaultDBFrameworkName = tempString;
             //load the third party schema names
@@ -120,7 +122,7 @@
                 //load the language emitter map
                 tempString = props.getProperty(EMITTER_CLASS_KEY);
                 if (tempString == null) {
-                    throw new Exception("No emitters found");
+                    throw new Exception(CodegenMessages.getMessage("propfileload.emitterMissing"));
                 } else {
                     String[] tempClassNames = tempString.split(SEPARATOR_CHAR);
                     //populate the map
@@ -135,7 +137,7 @@
             // load the default language
             tempString = props.getProperty(DEFAULT_LANGUAGE_TYPE_KEY);
             if (null == tempString || !languageEmitterMap.containsKey(tempString)) {
-                throw new Exception("Unknown Language specified for default!");
+                throw new Exception(CodegenMessages.getMessage("propfileload.unknownDefaultLang"));
             }
             defaultLanguage = tempString;
 
@@ -163,7 +165,7 @@
         } catch (IOException e) {
             throw new RuntimeException(e);
         } catch (Exception e) {
-            throw new RuntimeException("Exception while loading the property file", e);
+            throw new RuntimeException(CodegenMessages.getMessage("propfileload.generalException"), e);
         }
 
     }

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPTransportUtils.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPTransportUtils.java?rev=365826&r1=365825&r2=365826&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPTransportUtils.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPTransportUtils.java Tue Jan  3 21:07:18 2006
@@ -249,10 +249,10 @@
             }
 
             String charsetEncoding = builder.getDocument().getCharsetEncoding();
-
+        
             if ((charsetEncoding != null) && !"".equals(charsetEncoding)
-                    && !((String) msgContext.getProperty(
-                    MessageContext.CHARACTER_SET_ENCODING)).equalsIgnoreCase(charsetEncoding)) {
+                    && ! charsetEncoding.equalsIgnoreCase((String) msgContext.getProperty(
+                    MessageContext.CHARACTER_SET_ENCODING))) {
                 String faultCode;
 
                 if (SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(