Package org.apache.axis.utils

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;
View Full Code Here


        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

            // 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

TOP

Related Classes of org.apache.axis.utils.CLOption

Copyright © 2018 www.massapicom. 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.