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 WSDL2Java.java
Date Tue, 19 Mar 2002 17:40:10 GMT
dims        02/03/19 09:40:10

  Modified:    java/src/org/apache/axis/utils resources.properties
               java/src/org/apache/axis/wsdl WSDL2Java.java
  Log:
  Adding a timeout option for WSDL2Java command line utility.
  
  Revision  Changes    Path
  1.74      +1 -0      xml-axis/java/src/org/apache/axis/utils/resources.properties
  
  Index: resources.properties
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/utils/resources.properties,v
  retrieving revision 1.73
  retrieving revision 1.74
  diff -u -r1.73 -r1.74
  --- resources.properties	15 Mar 2002 17:15:52 -0000	1.73
  +++ resources.properties	19 Mar 2002 17:40:10 -0000	1.74
  @@ -436,6 +436,7 @@
   
   optionOutput00=output directory for emitted files
   optionPackage00=override all namespace to package mappings, use this package name instead
  +optionTimeout00=network timeout (in millisecs or -1 to disable)
   options00=Options:
   
   # NOTE:  in optionScope00, do not translate "Application", "Request", "Session"
  
  
  
  1.16      +12 -3     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.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- WSDL2Java.java	19 Mar 2002 15:42:02 -0000	1.15
  +++ WSDL2Java.java	19 Mar 2002 17:40:10 -0000	1.16
  @@ -103,6 +103,7 @@
       protected static final int DEBUG_OPT = 'D';
       protected static final int ALL_OPT = 'a';
       protected static final int TYPEMAPPING_OPT = 'T';
  +    protected static final int NETWORK_TIMEOUT_OPT = 'O';
   
       // Scope constants
       public static final byte NO_EXPLICIT_SCOPE = 0x00;
  @@ -182,7 +183,11 @@
           new CLOptionDescriptor("typeMappingVersion",
                   CLOptionDescriptor.ARGUMENT_REQUIRED,
                   TYPEMAPPING_OPT,
  -                JavaUtils.getMessage("optionTypeMapping00"))
  +                JavaUtils.getMessage("optionTypeMapping00")),
  +        new CLOptionDescriptor("timeout",
  +                CLOptionDescriptor.ARGUMENT_REQUIRED,
  +                NETWORK_TIMEOUT_OPT,
  +                JavaUtils.getMessage("optionTimeout00"))
       };
   
       /**
  @@ -423,8 +428,6 @@
           WSDLRunnable runnable = new WSDLRunnable(emitter, wsdlURL);
           Thread wsdlThread = new Thread(runnable);
   
  -        long timeout = new Date().getTime() + timeoutms;
  -
           wsdlThread.start();
   
           try {
  @@ -567,6 +570,7 @@
                       case DEBUG_OPT:
                           wsdl2java.debug(true);
                           break;
  +
                       case TYPEMAPPING_OPT:
                           String tmValue = option.getArgument();
                           if (tmValue.equals("1.1")) {
  @@ -576,6 +580,11 @@
                           } else {
                               System.out.println(JavaUtils.getMessage("badTypeMappingOption00"));
                           }
  +                        break;
  +
  +                    case NETWORK_TIMEOUT_OPT:
  +                        String timeoutValue = option.getArgument();
  +                        wsdl2java.setTimeout(Long.parseLong(timeoutValue));
                           break;
                   }
               }
  
  
  

Mime
View raw message