Examples of CLOption


Examples of org.apache.axis.utils.CLOption

        int size = clOptions.size();

        try {
            // Parse the options and configure the emitter as appropriate.
            for (int i = 0; i < size; i++) {
                CLOption option = (CLOption)clOptions.get(i);

                switch (option.getId()) {
                    case CLOption.TEXT_ARGUMENT:
                        if (wsdlURI != null) {
                            printUsage();
                        }
                        wsdlURI = option.getArgument();
                        break;

                    case HELP_OPT:
                        printUsage();
                        break;

                    case VERBOSE_OPT:
                        wsdl2java.verbose(true);
                        break;

                    case FACTORY_CLASS_OPT:
                        wsdl2java.factory(option.getArgument());
                        break;

                    case HELPER_CLASS_OPT:
                        wsdl2java.helperGen(true);
                        break;

                    case SKELETON_DEPLOY_OPT:
                        skeletonDeploy = option.getArgument(0);
                        if (skeletonDeploy.equalsIgnoreCase("true"))
                            wsdl2java.deploySkeleton(true);
                        else
                            wsdl2java.deploySkeleton(false);

                    case SERVER_OPT:
                        bServer = true;
                        wsdl2java.generateServerSide(true);
                        break;

                    case NAMESPACE_OPT:
                        String namespace = option.getArgument(0);
                        String packageName = option.getArgument(1);
                        namespaceMap.put(namespace, packageName);
                        break;

                    case NAMESPACE_FILE_OPT:
                        wsdl2java.setNStoPkg(option.getArgument());
                        break;

                    case PACKAGE_OPT:
                        bPackageOpt = true;
                        wsdl2java.setPackageName(option.getArgument());
                        break;

                    case OUTPUT_OPT:
                        wsdl2java.setOutputDir(option.getArgument());
                        break;

                    case SCOPE_OPT:
                        String scope = option.getArgument();
                        if ("Application".equals(scope)) {
                            wsdl2java.setScope(Emitter.APPLICATION_SCOPE);
                        }
                        else if ("Request".equals(scope)) {
                            wsdl2java.setScope(Emitter.REQUEST_SCOPE);
                        }
                        else if ("Session".equals(scope)) {
                            wsdl2java.setScope(Emitter.SESSION_SCOPE);
                        }
                        else {
                            System.err.println(
                                    JavaUtils.getMessage("badScope00", scope));
                        }
                        break;

                    case TEST_OPT:
                        bTestClass = true;
                        wsdl2java.generateTestCase(true);
                        break;

                    case NOIMPORTS_OPT:
                        wsdl2java.generateImports(false);
                        break;

                    case ALL_OPT:
                        wsdl2java.generateAll(true);
                        break;

                    case DEBUG_OPT:
                        wsdl2java.debug(true);
                        break;

                    case TYPEMAPPING_OPT:
                        String tmValue = option.getArgument();
                        if (tmValue.equals("1.1")) {
                            typeMappingVersion = "1.1";
                        } else if (tmValue.equals("1.2")) {
                            typeMappingVersion = "1.2";
                        } else {
                            System.out.println(JavaUtils.getMessage("badTypeMappingOption00"));
                        }
                        break;

                    case NETWORK_TIMEOUT_OPT:
                        String timeoutValue = option.getArgument();
                        long timeout = Long.parseLong(timeoutValue);
                        // Convert seconds to milliseconds.
                        if(timeout > 0)
                            timeout = timeout * 1000;
                        wsdl2java.setTimeout(timeout);
                        break;
                       
                    case USERNAME_OPT:
                        wsdl2java.setUsername(option.getArgument());
                        break;

                    case PASSWORD_OPT:
                        wsdl2java.setPassword(option.getArgument());
                        break;
                       
                }
            }

View Full Code Here

Examples of org.apache.axis.utils.CLOption

            // Instantiate the emitter
            Emitter emitter = new Emitter();

            // Parse the options and configure the emitter as appropriate.
            for (int i = 0; i < size; i++) {
                CLOption option = (CLOption)clOptions.get(i);

                switch (option.getId()) {
                    case CLOption.TEXT_ARGUMENT:
                        if (className != null) {
                            printUsage();
                        }
                        className = option.getArgument();
                        break;

                    case METHODS_ALLOWED_OPT:
                        emitter.setAllowedMethods(option.getArgument());
                        break;

                    case INHERITED_CLASS_OPT:
                        emitter.setUseInheritedMethods(true);
                        break;

                    case FACTORY_CLASS_OPT:
                        emitter.setFactory(option.getArgument());
                        break;

                    case IMPL_CLASS_OPT:
                        emitter.setImplCls(option.getArgument());
                        break;

                    case HELP_OPT:
                        printUsage();
                        break;

                    case OUTPUT_WSDL_MODE_OPT:
                        String modeArg = option.getArgument();
                        if ("All".equalsIgnoreCase(modeArg))
                            mode = Emitter.MODE_ALL;
                        else if ("Interface".equalsIgnoreCase(modeArg))
                            mode = Emitter.MODE_INTERFACE;
                        else if ("Implementation".equalsIgnoreCase(modeArg))
                            mode = Emitter.MODE_IMPLEMENTATION;
                        else {
                            mode = Emitter.MODE_ALL;
                            System.err.println(JavaUtils.getMessage("j2wmodeerror", modeArg));
                        }
                        break;

                    case OUTPUT_OPT:
                        wsdlFilename = option.getArgument();
                        break;

                    case OUTPUT_IMPL_OPT:
                        wsdlImplFilename = option.getArgument();
                        break;

                    case PACKAGE_OPT:
                        String packageName = option.getArgument(0);
                        String namespace = option.getArgument(1);
                        namespaceMap.put(packageName, namespace);
                        break;

                    case NAMESPACE_OPT:
                        emitter.setIntfNamespace(option.getArgument());
                        break;

                    case NAMESPACE_IMPL_OPT:
                        emitter.setImplNamespace(option.getArgument());
                        break;

                    case SERVICE_ELEMENT_NAME_OPT:
                        emitter.setServiceElementName(option.getArgument());
                        break;

                    case SERVICE_PORT_NAME_OPT:
                        emitter.setServicePortName(option.getArgument());
                        break;

                    case LOCATION_OPT:
                        emitter.setLocationUrl(option.getArgument());
                        locationSet = true;
                        break;

                    case LOCATION_IMPORT_OPT:
                        emitter.setImportUrl(option.getArgument());
                        break;
                       
                    case METHODS_NOTALLOWED_OPT:
                        emitter.setDisallowedMethods(option.getArgument());
                        break;
                       
                    case PORTTYPE_NAME_OPT:
                        emitter.setPortTypeName(option.getArgument());
                        break;
                       
                    case STOP_CLASSES_OPT:
                        emitter.setStopClasses(option.getArgument());
                        break;

                    case TYPEMAPPING_OPT:
                        String value = option.getArgument();
                        if (value.equals("1.1")) {
                            emitter.setDefaultTypeMapping(
                                DefaultTypeMappingImpl.getSingleton());
                        } else if (value.equals("1.2")) {
                            emitter.setDefaultTypeMapping(
View Full Code Here

Examples of org.apache.commons.cli.avalon.CLOption

        Properties jmeterProps = JMeterUtils.getJMeterProperties();
        List<CLOption> clOptions = parser.getArguments();
        int size = clOptions.size();

        for (int i = 0; i < size; i++) {
            CLOption option = clOptions.get(i);
            String name = option.getArgument(0);
            String value = option.getArgument(1);

            switch (option.getDescriptor().getId()) {
            case PROPFILE2_OPT: // Bug 33920 - allow multiple props
                File f = new File(name);
                FileInputStream inStream = null;
                try {
                    inStream = new FileInputStream(f);
View Full Code Here

Examples of org.apache.commons.cli.avalon.CLOption

                    throw ex;
                }
                startOptionalServers();
            } else {
                String testFile=null;
                CLOption testFileOpt = parser.getArgumentById(TESTFILE_OPT);
                if (testFileOpt != null){
                    testFile = testFileOpt.getArgument();
                    if (USE_LAST_JMX.equals(testFile)) {
                        testFile = LoadRecentProject.getRecentFile(0);// most recent
                    }
                }
                if (parser.getArgumentById(NONGUI_OPT) == null) {
                    startGui(testFile);
                    startOptionalServers();
                } else {
                    CLOption rem=parser.getArgumentById(REMOTE_OPT_PARAM);
                    if (rem==null) { rem=parser.getArgumentById(REMOTE_OPT); }
                    CLOption jtl = parser.getArgumentById(LOGFILE_OPT);
                    String jtlFile = null;
                    if (jtl != null){
                        jtlFile=processLAST(jtl.getArgument(), ".jtl"); // $NON-NLS-1$
                    }
                    startNonGui(testFile, jtlFile, rem);
                    startOptionalServers();
                }
            }
View Full Code Here

Examples of org.apache.commons.cli.avalon.CLOption

        List<CLOption> clOptions = parser.getArguments();
        int size = clOptions.size();

        for (int i = 0; i < size; i++) {
            CLOption option = clOptions.get(i);
            String name = option.getArgument(0);
            String value = option.getArgument(1);
            FileInputStream fis = null;

            switch (option.getDescriptor().getId()) {

            // Should not have any text arguments
            case CLOption.TEXT_ARGUMENT:
                throw new IllegalArgumentException("Unknown arg: "+option.getArgument());

            case PROPFILE2_OPT: // Bug 33920 - allow multiple props
                try {
                    fis = new FileInputStream(new File(name));
                    Properties tmp = new Properties();
View Full Code Here

Examples of org.apache.commons.cli.avalon.CLOption

        Properties jmeterProps = JMeterUtils.getJMeterProperties();
        List clOptions = parser.getArguments();
        int size = clOptions.size();

        for (int i = 0; i < size; i++) {
            CLOption option = (CLOption) clOptions.get(i);
            String name = option.getArgument(0);
            String value = option.getArgument(1);

            switch (option.getDescriptor().getId()) {
            case PROPFILE2_OPT: // Bug 33920 - allow multiple props
                File f = new File(name);
                try {
                    jmeterProps.load(new FileInputStream(f));
                } catch (FileNotFoundException e) {
View Full Code Here

Examples of org.apache.commons.cli.avalon.CLOption

                // Start the server
        startServer(JMeterUtils.getPropDefault("server_port", 0));// $NON-NLS-1$
        startOptionalServers();
      } else {
              String testFile=null;
              CLOption testFileOpt = parser.getArgumentById(TESTFILE_OPT);
              if (testFileOpt != null){
                  testFile = testFileOpt.getArgument();
                  if (USE_LAST_JMX.equals(testFile)) {
                      testFile = LoadRecentProject.getRecentFile(0);// most recent
                  }
              }
                if (parser.getArgumentById(NONGUI_OPT) == null) {
                  startGui(testFile);
                  startOptionalServers();
                } else {
                  CLOption rem=parser.getArgumentById(REMOTE_OPT_PARAM);
                  if (rem==null) { rem=parser.getArgumentById(REMOTE_OPT); }
                  CLOption jtl = parser.getArgumentById(LOGFILE_OPT);
                  String jtlFile = null;
                  if (jtl != null){
                      jtlFile=processLAST(jtl.getArgument(), ".jtl"); // $NON-NLS-1$
                  }
                  startNonGui(testFile, jtlFile, rem);
                  startOptionalServers();
                }
            }
View Full Code Here

Examples of org.apache.commons.cli.avalon.CLOption

   
    List clOptions = parser.getArguments();
    int size = clOptions.size();

    for (int i = 0; i < size; i++) {
      CLOption option = (CLOption) clOptions.get(i);
      String name = option.getArgument(0);
      String value = option.getArgument(1);
            FileInputStream fis = null;           

      switch (option.getDescriptor().getId()) {
     
      // Should not have any text arguments
            case CLOption.TEXT_ARGUMENT:
                throw new IllegalArgumentException("Unknown arg: "+option.getArgument());
     
            case PROPFILE2_OPT: // Bug 33920 - allow multiple props
        try {
                    fis = new FileInputStream(new File(name));
          Properties tmp = new Properties();
View Full Code Here

Examples of org.apache.commons.cli.avalon.CLOption

                    throw ex;
                }
                startOptionalServers();
            } else {
                String testFile=null;
                CLOption testFileOpt = parser.getArgumentById(TESTFILE_OPT);
                if (testFileOpt != null){
                    testFile = testFileOpt.getArgument();
                    if (USE_LAST_JMX.equals(testFile)) {
                        testFile = LoadRecentProject.getRecentFile(0);// most recent
                    }
                }
                if (parser.getArgumentById(NONGUI_OPT) == null) {
                    startGui(testFile);
                    startOptionalServers();
                } else {
                    CLOption rem=parser.getArgumentById(REMOTE_OPT_PARAM);
                    if (rem==null) { rem=parser.getArgumentById(REMOTE_OPT); }
                    CLOption jtl = parser.getArgumentById(LOGFILE_OPT);
                    String jtlFile = null;
                    if (jtl != null){
                        jtlFile=processLAST(jtl.getArgument(), ".jtl"); // $NON-NLS-1$
                    }
                    startNonGui(testFile, jtlFile, rem);
                    startOptionalServers();
                }
            }
View Full Code Here

Examples of org.apache.commons.cli.avalon.CLOption

        List<CLOption> clOptions = parser.getArguments();
        int size = clOptions.size();

        for (int i = 0; i < size; i++) {
            CLOption option = clOptions.get(i);
            String name = option.getArgument(0);
            String value = option.getArgument(1);
            FileInputStream fis = null;

            switch (option.getDescriptor().getId()) {

            // Should not have any text arguments
            case CLOption.TEXT_ARGUMENT:
                throw new IllegalArgumentException("Unknown arg: "+option.getArgument());

            case PROPFILE2_OPT: // Bug 33920 - allow multiple props
                try {
                    fis = new FileInputStream(new File(name));
                    Properties tmp = new Properties();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.