Package org.apache.axis2.wsdl.codegen.emitter

Examples of org.apache.axis2.wsdl.codegen.emitter.Emitter


        try {
            for (int i = 0; i < this.moduleEndpoints.size(); i++) {
                ((CodeGenExtension) this.moduleEndpoints.get(i)).engage();
            }

            Emitter emitter;
            TypeMapper mapper = configuration.getTypeMapper();

            Map emitterMap = ConfigPropertyFileLoader.getLanguageEmitterMap();
            String className = emitterMap.get(this.configuration.getOutputLanguage()).toString();
            if (className!=null){
               
                emitter = (Emitter)getObjectFromClassName(className);
                emitter.setCodeGenConfiguration(this.configuration);
                emitter.setMapper(mapper);

            }else{
                throw new Exception("Emitter class not found!");
            }


            if (this.configuration.isServerSide()){
                emitter.emitSkeleton();
            }else{
                emitter.emitStub();
            }

        } catch (ClassCastException e) {
            throw new CodeGenerationException("Non emitter class found!",e);
View Full Code Here


            //engage the pre-extensions
            for (int i = 0; i < preExtensions.size(); i++) {
                ((CodeGenExtension)preExtensions.get(i)).engage(configuration);
            }

            Emitter emitter;


            TypeMapper mapper = configuration.getTypeMapper();
            if (mapper == null) {
                // this check is redundant here. The default databinding extension should
                // have already figured this out and thrown an error message. However in case the
                // users decides to mess with the config it is safe to keep this check in order to throw
                // a meaningful error message
                throw new CodeGenerationException(
                        CodegenMessages.getMessage("engine.noProperDatabindingException"));
            }

            //Find and invoke the emitter by reflection
            Map emitterMap = ConfigPropertyFileLoader.getLanguageEmitterMap();
            String className = (String)emitterMap.get(configuration.getOutputLanguage());
            if (className != null) {
                emitter = (Emitter)getObjectFromClassName(className);
                emitter.setCodeGenConfiguration(configuration);
                emitter.setMapper(mapper);
            } else {
                throw new Exception(CodegenMessages.getMessage("engine.emitterMissing"));
            }

            //invoke the necessary methods in the emitter
            if (configuration.isServerSide()) {
                emitter.emitSkeleton();
                // if the users want both client and server, it would be in the
                // generate all option
                if (configuration.isGenerateAll()) {
                    emitter.emitStub();
                }
            } else {
                emitter.emitStub();
            }

            //engage the post-extensions
            for (int i = 0; i < postExtensions.size(); i++) {
                ((CodeGenExtension)postExtensions.get(i)).engage(configuration);
View Full Code Here

        try {
            for (int i = 0; i < this.moduleEndpoints.size(); i++) {
                ((CodeGenExtension) this.moduleEndpoints.get(i)).engage();
            }

            Emitter emitter;
            TypeMapper mapper = configuration.getTypeMapper();

            Map emitterMap = ConfigPropertyFileLoader.getLanguageEmitterMap();
            String className = emitterMap.get(this.configuration.getOutputLanguage()).toString();
            if (className!=null){
               
                emitter = (Emitter)getObjectFromClassName(className);
                emitter.setCodeGenConfiguration(this.configuration);
                emitter.setMapper(mapper);

            }else{
                throw new Exception("Emitter class not found!");
            }


            if (this.configuration.isServerSide()){
                emitter.emitSkeleton();
            }else{
                emitter.emitStub();
            }

        } catch (ClassCastException e) {
            throw new CodeGenerationException("Non emitter class found!",e);
View Full Code Here

            //engage the pre-extensions
            for (int i = 0; i < preExtensions.size(); i++) {
                ((CodeGenExtension) preExtensions.get(i)).engage(configuration);
            }

            Emitter emitter;


            TypeMapper mapper = configuration.getTypeMapper();
            if (mapper == null) {
                // this check is redundant here. The default databinding extension should
                // have already figured this out and thrown an error message. However in case the
                // users decides to mess with the config it is safe to keep this check in order to throw
                // a meaningful error message
                throw new CodeGenerationException(CodegenMessages.getMessage("engine.noProperDatabindingException"));
            }

            //Find and invoke the emitter by reflection
            Map emitterMap = ConfigPropertyFileLoader.getLanguageEmitterMap();
            String className = (String)emitterMap.get(configuration.getOutputLanguage());
            if (className != null) {
                emitter = (Emitter) getObjectFromClassName(className);
                emitter.setCodeGenConfiguration(configuration);
                emitter.setMapper(mapper);
            } else {
                throw new Exception(CodegenMessages.getMessage("engine.emitterMissing"));
            }


            //invoke the necessary methods in the emitter
            if (configuration.isServerSide()) {
                emitter.emitSkeleton();
                // if the users want both client and server, it would be in the
                // generate all option
                if (configuration.isGenerateAll()) {
                    emitter.emitStub();
                }
            }else{
                emitter.emitStub();
            }

            //engage the post-extensions
            for (int i = 0; i < postExtensions.size(); i++) {
                ((CodeGenExtension) postExtensions.get(i)).engage(configuration);
View Full Code Here

        try {
            for (int i = 0; i < extensions.size(); i++) {
                ((CodeGenExtension) extensions.get(i)).engage();
            }

            Emitter emitter;


            TypeMapper mapper = configuration.getTypeMapper();
            if (mapper == null) {
                // this check is redundant here. The default databinding extension should
                // have already figured this out and thrown an error message. However in case the
                // users decides to mess with the config it is safe to keep this check in order to throw
                // a meaningful error message
                throw new CodeGenerationException(CodegenMessages.getMessage("engine.noProperDatabindingException"));
            }

            Map emitterMap = ConfigPropertyFileLoader.getLanguageEmitterMap();
            String className = (String)emitterMap.get(configuration.getOutputLanguage());
            if (className != null) {
                emitter = (Emitter) getObjectFromClassName(className);
                emitter.setCodeGenConfiguration(configuration);
                emitter.setMapper(mapper);
            } else {
                throw new Exception(CodegenMessages.getMessage("engine.emitterMissing"));
            }



            if (configuration.isServerSide()) {
                emitter.emitSkeleton();
                //if the users want both client and server, it would be in the
                // generate all option

                if (configuration.isGenerateAll()) {
                    emitter.emitStub();
                }
            }else{
                emitter.emitStub();
            }



        } catch (ClassCastException e) {
View Full Code Here

        try {
            for (int i = 0; i < moduleEndpoints.size(); i++) {
                ((CodeGenExtension) moduleEndpoints.get(i)).engage();
            }

            Emitter emitter;


            TypeMapper mapper = configuration.getTypeMapper();
            if (mapper == null) {
                // this check is redundant here. The default databinding extension should
                // have already figured this out and thrown an error message. However in case the
                // users decides to mess with the config it is safe to keep this check in order to throw
                // a meaningful error message
                throw new CodeGenerationException(CodegenMessages.getMessage("engine.noProperDatabindingException"));
            }

            Map emitterMap = ConfigPropertyFileLoader.getLanguageEmitterMap();
            String className = emitterMap.get(configuration.getOutputLanguage()).toString();
            if (className != null) {
                emitter = (Emitter) getObjectFromClassName(className);
                emitter.setCodeGenConfiguration(configuration);
                emitter.setMapper(mapper);
            } else {
                throw new Exception(CodegenMessages.getMessage("engine.emitterMissing"));
            }


            if (configuration.isServerSide()) {
                emitter.emitSkeleton();
            }

            if (!configuration.isServerSide() || configuration.isWriteTestCase()) {
                emitter.emitStub();
            }

        } catch (ClassCastException e) {
            throw new CodeGenerationException(CodegenMessages.getMessage("engine.wrongEmitter"), e);
View Full Code Here

        for(int i = 0; i< this.moduleEndpoints.size(); i++){
            ((CodeGenExtension)this.moduleEndpoints.get(i)).engage();
        }

        Emitter emitter = null;
        TypeMapper mapper = configuration.getTypeMapper();

        switch (configuration.getOutputLanguage()){
            case XSLTConstants.LanguageTypes.JAVA:
                emitter =  new JavaEmitter(this.configuration,mapper);
                break;
            case XSLTConstants.LanguageTypes.C_SHARP:
                emitter = new CSharpEmitter(this.configuration,mapper);
                break;
            case XSLTConstants.LanguageTypes.C_PLUS_PLUS:
            case XSLTConstants.LanguageTypes.VB_DOT_NET:

            default:
                throw new UnsupportedOperationException();

        }
        if (this.configuration.isServerSide())
            emitter.emitSkeleton();
        else
            emitter.emitStub();


    }
View Full Code Here

        try {
            for (int i = 0; i < extensions.size(); i++) {
                ((CodeGenExtension) extensions.get(i)).engage();
            }

            Emitter emitter;


            TypeMapper mapper = configuration.getTypeMapper();
            if (mapper == null) {
                // this check is redundant here. The default databinding extension should
                // have already figured this out and thrown an error message. However in case the
                // users decides to mess with the config it is safe to keep this check in order to throw
                // a meaningful error message
                throw new CodeGenerationException(CodegenMessages.getMessage("engine.noProperDatabindingException"));
            }

            Map emitterMap = ConfigPropertyFileLoader.getLanguageEmitterMap();
            String className = (String)emitterMap.get(configuration.getOutputLanguage());
            if (className != null) {
                emitter = (Emitter) getObjectFromClassName(className);
                emitter.setCodeGenConfiguration(configuration);
                emitter.setMapper(mapper);
            } else {
                throw new Exception(CodegenMessages.getMessage("engine.emitterMissing"));
            }



            if (configuration.isServerSide()) {
                emitter.emitSkeleton();
                // if the users want both client and server, it would be in the
                // generate all option

                if (configuration.isGenerateAll()) {
                    emitter.emitStub();
                }
            }else{
                emitter.emitStub();
            }



        } catch (ClassCastException e) {
View Full Code Here

        try {
            for (int i = 0; i < this.moduleEndpoints.size(); i++) {
                ((CodeGenExtension) this.moduleEndpoints.get(i)).engage();
            }

            Emitter emitter = null;
            TypeMapper mapper = configuration.getTypeMapper();

            switch (configuration.getOutputLanguage()) {
                case XSLTConstants.LanguageTypes.JAVA:
                    emitter = new JavaEmitter(this.configuration, mapper);
                    break;
                case XSLTConstants.LanguageTypes.C_SHARP:
                    emitter = new CSharpEmitter(this.configuration, mapper);
                    break;
                case XSLTConstants.LanguageTypes.C_PLUS_PLUS:
                case XSLTConstants.LanguageTypes.VB_DOT_NET:

                default:
                    throw new UnsupportedOperationException();

            }
            if (this.configuration.isServerSide())
                emitter.emitSkeleton();
            else
                emitter.emitStub();
        } catch (Exception e) {
            throw new CodeGenerationException(e);
        }

View Full Code Here

            //engage the pre-extensions
            for (int i = 0; i < preExtensions.size(); i++) {
                ((CodeGenExtension)preExtensions.get(i)).engage(configuration);
            }

            Emitter emitter;


            TypeMapper mapper = configuration.getTypeMapper();
            if (mapper == null) {
                // this check is redundant here. The default databinding extension should
                // have already figured this out and thrown an error message. However in case the
                // users decides to mess with the config it is safe to keep this check in order to throw
                // a meaningful error message
                throw new CodeGenerationException(
                        CodegenMessages.getMessage("engine.noProperDatabindingException"));
            }

            //Find and invoke the emitter by reflection
            Map emitterMap = ConfigPropertyFileLoader.getLanguageEmitterMap();
            String className = (String)emitterMap.get(configuration.getOutputLanguage());
            if (className != null) {
                emitter = (Emitter)getObjectFromClassName(className);
                emitter.setCodeGenConfiguration(configuration);
                emitter.setMapper(mapper);
            } else {
                throw new Exception(CodegenMessages.getMessage("engine.emitterMissing"));
            }

            //invoke the necessary methods in the emitter
            if (configuration.isServerSide()) {
                emitter.emitSkeleton();
                // if the users want both client and server, it would be in the
                // generate all option
                if (configuration.isGenerateAll()) {
                    emitter.emitStub();
                }
            } else {
                emitter.emitStub();
            }

            //engage the post-extensions
            for (int i = 0; i < postExtensions.size(); i++) {
                ((CodeGenExtension)postExtensions.get(i)).engage(configuration);
View Full Code Here

TOP

Related Classes of org.apache.axis2.wsdl.codegen.emitter.Emitter

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.