axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bu...@apache.org
Subject cvs commit: xml-axis/java/src/org/apache/axis/wsdl Wsdl2java.java
Date Tue, 18 Sep 2001 21:01:07 GMT
butek       01/09/18 14:01:07

  Modified:    java/src/org/apache/axis/wsdl Wsdl2java.java
  Log:
  Submitted by Ravi Kumar (rkumar@borland.com) and modified a bit by me:
  1. Add an output directory option
  2. Fix a bug in WriteType to avoid creating duplicate constructors, when
  elements size is 0
  3. Emit a dummy impl class if one doesn't already exist. The idea is that
  as soon as generation is done the src will build without any compile errors
  4. Emit classes to the appropriate directory based on package name
  5. Added more type mappings for standard xsd to java
  
  Revision  Changes    Path
  1.9       +15 -1     xml-axis/java/src/org/apache/axis/wsdl/Wsdl2java.java
  
  Index: Wsdl2java.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/Wsdl2java.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- Wsdl2java.java	2001/09/12 14:51:01	1.8
  +++ Wsdl2java.java	2001/09/18 21:01:07	1.9
  @@ -73,6 +73,7 @@
       protected static final int MESSAGECONTEXT_OPT = 'm';
       protected static final int SKELETON_OPT = 's';
       protected static final int PACKAGE_OPT = 'p';
  +    protected static final int OUTPUT_OPT = 'o';
   
       /**
        *  Define the understood options. Each CLOptionDescriptor contains:
  @@ -104,6 +105,10 @@
                   CLOptionDescriptor.ARGUMENT_REQUIRED,
                   PACKAGE_OPT,
                   "package to put emitted files in"),
  +        new CLOptionDescriptor("output",
  +                CLOptionDescriptor.ARGUMENT_REQUIRED,
  +                OUTPUT_OPT,
  +                "output dir for emitted files"),
       };
   
       /**
  @@ -113,8 +118,10 @@
           boolean bSkeleton = false;
           boolean bMessageContext = false;
           boolean bVerbose = false;
  +        boolean bGeneratePackageName = false;
           String packageName = null;
           String wsdlURI = null;
  +        String outputDir = null;
   
           // Parse the arguments
           CLArgsParser parser = new CLArgsParser(args, options);
  @@ -158,6 +165,12 @@
   
                   case PACKAGE_OPT:
                       packageName = option.getArgument();
  +                    if (packageName == null)
  +                      bGeneratePackageName = true;
  +                    break;
  +
  +                case OUTPUT_OPT:
  +                    outputDir = option.getArgument();
                       break;
               }
           }
  @@ -178,9 +191,10 @@
               emitter.generateSkeleton(bSkeleton);
               emitter.verbose(bVerbose);
               emitter.generateMessageContext(bMessageContext);
  +            emitter.generatePackageName(bGeneratePackageName);
               if (packageName != null)
                   emitter.setPackageName(packageName);
  -
  +            emitter.setOutputDir(outputDir);
               // Start writing code!
               emitter.emit(wsdlURI);
           }
  
  
  

Mime
View raw message