axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject cvs commit: xml-axis/java/src/org/apache/axis/wsdl/gen WSDL2.java
Date Mon, 03 Mar 2003 11:45:20 GMT
dims        2003/03/03 03:45:20

  Modified:    java/src/org/apache/axis/wsdl/toJava
                        JavaGeneratorFactory.java JavaServiceWriter.java
                        Utils.java
               java/src/org/apache/axis/wsdl/gen WSDL2.java
  Log:
  Fix for Bug 17585 - Various toJava classes use 'private' accessor making subclassing difficult
  Fix for Bug 17586 - Unable to remove options from subclasses of WSDL2Java
  
  Revision  Changes    Path
  1.38      +3 -3      xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaGeneratorFactory.java
  
  Index: JavaGeneratorFactory.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaGeneratorFactory.java,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- JavaGeneratorFactory.java	1 Mar 2003 01:31:03 -0000	1.37
  +++ JavaGeneratorFactory.java	3 Mar 2003 11:45:19 -0000	1.38
  @@ -211,7 +211,7 @@
       /**
        * Return Wsdl2java's JavaBindingWriter object.
        */
  -    private Writers bindingWriters = new Writers();
  +    protected Writers bindingWriters = new Writers();
   
       public Generator getGenerator(Binding binding, SymbolTable symbolTable) {
           Generator writer = new JavaBindingWriter(emitter, binding, symbolTable);
  @@ -223,7 +223,7 @@
       /**
        * Return Wsdl2java's JavaServiceWriter object.
        */
  -    private Writers serviceWriters = new Writers();
  +    protected Writers serviceWriters = new Writers();
   
       public Generator getGenerator(Service service, SymbolTable symbolTable) {
           Generator writer = new JavaServiceWriter(emitter, service, symbolTable);
  @@ -254,7 +254,7 @@
       } // getGenerator
   
       // Hack class just to play with the idea of adding writers
  -    class Writers implements Generator {
  +    protected class Writers implements Generator {
           Vector writers = new Vector();
           SymbolTable symbolTable = null;
           Generator baseWriter = null;
  
  
  
  1.6       +3 -3      xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaServiceWriter.java
  
  Index: JavaServiceWriter.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaServiceWriter.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- JavaServiceWriter.java	11 Dec 2002 22:38:30 -0000	1.5
  +++ JavaServiceWriter.java	3 Mar 2003 11:45:19 -0000	1.6
  @@ -66,9 +66,9 @@
   * <serviceName>.java, <serviceName>TestCase.java.
   */
   public class JavaServiceWriter implements Generator {
  -    Generator serviceIfaceWriter = null;
  -    Generator serviceImplWriter = null;
  -    Generator testCaseWriter = null;
  +    protected Generator serviceIfaceWriter = null;
  +    protected Generator serviceImplWriter = null;
  +    protected Generator testCaseWriter = null;
   
       /**
        * Constructor.
  
  
  
  1.72      +1 -1      xml-axis/java/src/org/apache/axis/wsdl/toJava/Utils.java
  
  Index: Utils.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/Utils.java,v
  retrieving revision 1.71
  retrieving revision 1.72
  diff -u -r1.71 -r1.72
  --- Utils.java	2 Mar 2003 20:11:59 -0000	1.71
  +++ Utils.java	3 Mar 2003 11:45:19 -0000	1.72
  @@ -879,7 +879,7 @@
        * @param symbolTable used to lookup enumerations
        * @param bThrow set to true if contructor needs try/catch block
        */ 
  -    static String getConstructorForParam(Parameter param, 
  +    public static String getConstructorForParam(Parameter param, 
                                            SymbolTable symbolTable,
                                            BooleanHolder bThrow) {
           
  
  
  
  1.15      +29 -1     xml-axis/java/src/org/apache/axis/wsdl/gen/WSDL2.java
  
  Index: WSDL2.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/gen/WSDL2.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- WSDL2.java	11 Dec 2002 22:38:28 -0000	1.14
  +++ WSDL2.java	3 Mar 2003 11:45:19 -0000	1.15
  @@ -145,7 +145,35 @@
       } // addOptions
   
       /**
  -     * Parse an option
  +     * removeOption
  +     * Remove an option description from the tool.
  +     * @param name   the name of the CLOptionDescriptor to remove
  +     */
  +    protected void removeOption(String name) {
  +        int foundOptionIndex = -1;
  +        for (int i = 0; i < options.length; i++) {
  +            if (options[i].getName().equals(name)) {
  +                foundOptionIndex = i;
  +                break;
  +            }
  +        }
  +        if (foundOptionIndex != -1) {
  +            CLOptionDescriptor[] newOptions =
  +                new CLOptionDescriptor[options.length - 1];
  +            System.arraycopy(options, 0, newOptions, 0, foundOptionIndex);
  +            if (foundOptionIndex < newOptions.length) {
  +                System.arraycopy(
  +                    options,
  +                    foundOptionIndex + 1,
  +                    newOptions,
  +                    foundOptionIndex,
  +                    newOptions.length - foundOptionIndex);
  +            }
  +            options = newOptions;
  +        }
  +    } // removeOption
  +
  +    /**     * Parse an option
        * @param option CLOption is the option
        */
       protected void parseOption(CLOption option) {
  
  
  

Mime
View raw message