Examples of CodeGenConfiguration


Examples of org.apache.axis2.wsdl.codegen.CodeGenConfiguration

     *   Write VC Projects
     */

    protected void writeVCProjectFile() throws Exception {
        Document doc = createDOMDocumentForInterfaceImplementation();
        CodeGenConfiguration codegen = this.codeGenConfiguration;
        Element rootElement = doc.getDocumentElement();
        String outputLocation = codegen.getOutputLocation().getPath();
        String targetSourceLocation = codegen.getSourceLocation();
        addAttribute(doc, "targetSourceLocation",targetSourceLocation, rootElement);
        if(codegen.isSetoutputSourceLocation() && !outputLocation.equals(".") && !outputLocation.equals("")){
            if(!codegen.isFlattenFiles()){
                addAttribute(doc,"option","1",rootElement);
            } else{
                addAttribute(doc,"option","0",rootElement);
            }
            addAttribute(doc,"outputlocation",outputLocation,rootElement);
View Full Code Here

Examples of org.apache.axis2.wsdl.codegen.CodeGenConfiguration

                                                                                                isGenerateServerSideInterface,
                                                                                                optionsPage.getAdvanceOptions());

                 //Fix for the CodeGenConfiguration Contructor Change
                 //CodeGenConfiguration codegenConfig = new CodeGenConfiguration(service, optionsMap);
                 CodeGenConfiguration codegenConfig = new CodeGenConfiguration(optionsMap);
                 codegenConfig.addAxisService(service);
                
                 //set the wsdl definision for codegen config for skeleton generarion.
                 WSDLPropertyReader reader = new WSDLPropertyReader();
                 reader.readWSDL(wsdlSelectionPage.getFileName());
                 Definition wsdlDefinition = reader.getWsdlDefinition();
                 codegenConfig.setWsdlDefinition(wsdlDefinition);
                
                 //set the baseURI
                 codegenConfig.setBaseURI(generator.getBaseUri(wsdlSelectionPage.getFileName()));
                 monitor.worked(1);
                
                 monitor.subTask(CodegenWizardPlugin.getResourceString("generator.generating"));
                
                 new CodeGenerationEngine(codegenConfig).generate();
View Full Code Here

Examples of org.apache.axis2.wsdl.codegen.CodeGenConfiguration

        ClassLoader tcl = Thread.currentThread().getContextClassLoader();
        try {
            if (!"xmlbeans".equals(getDatabindingName())) {
                Thread.currentThread().setContextClassLoader(Class.class.getClassLoader());
            }
            CodeGenConfiguration codegenConfig = new CodeGenConfiguration(fillOptionMap());
            codegenConfig.addAxisService(getAxisService(WSDLFileName));
            codegenConfig.setWsdlDefinition(wsdlDefinition);
            //set the baseURI
            codegenConfig.setBaseURI(getBaseUri(WSDLFileName));
            new CodeGenerationEngine(codegenConfig).generate();
        } catch (Throwable e) {
            try {
                CodeGenConfiguration codegenConfig = new CodeGenConfiguration(fillOptionMap());
                codegenConfig.addAxisService(getAxisService(WSDLFileName));
                codegenConfig.setWsdlDefinition(wsdlDefinition);
                //set the baseURI
                codegenConfig.setBaseURI(getBaseUri(WSDLFileName));
                new CodeGenerationEngine(codegenConfig).generate();
            } catch (Throwable e1) {
                throw new Exception("Code generation failed due to " + e.getLocalizedMessage());
            }
        } finally {
View Full Code Here

Examples of org.apache.axis2.wsdl.codegen.CodeGenConfiguration

        ClassLoader tcl = Thread.currentThread().getContextClassLoader();
        try {
            if (!"xmlbeans".equals(getDatabindingName())) {
                Thread.currentThread().setContextClassLoader(Class.class.getClassLoader());
            }
            CodeGenConfiguration codegenConfig = new CodeGenConfiguration(getAxisService(WSDLFileName), fillOptionMap());
            //set the baseURI
            codegenConfig.setBaseURI(getBaseUri(WSDLFileName));
            new CodeGenerationEngine(codegenConfig).generate();
        } catch (Throwable e) {
            try {
                CodeGenConfiguration codegenConfig = new CodeGenConfiguration(getAxisService(WSDLFileName), fillOptionMap());
                //set the baseURI
                codegenConfig.setBaseURI(getBaseUri(WSDLFileName));
                new CodeGenerationEngine(codegenConfig).generate();
            } catch (Throwable e1) {
                throw new Exception("Code generation failed due to " + e.getLocalizedMessage());
            }
        } finally {
View Full Code Here

Examples of org.apache.axis2.wsdl.codegen.CodeGenConfiguration

                                                                                                outputPage.getOutputLocation(),
                                                                                                optionsPage.getNs2PkgMapping(),
                                                                                                isGenerateServerSideInterface);

                
                 CodeGenConfiguration codegenConfig = new CodeGenConfiguration(service, optionsMap);
                 //set the baseURI
                 codegenConfig.setBaseURI(generator.getBaseUri(wsdlSelectionPage.getFileName()));
                 monitor.worked(1);
                
                 monitor.subTask(CodegenWizardPlugin.getResourceString("generator.generating"));
                
                 new CodeGenerationEngine(codegenConfig).generate();
View Full Code Here

Examples of org.apache.axis2.wsdl.codegen.CodeGenConfiguration

                                         optionsPage.isGenerateTestCase(),
                                         wsdlSelectionPage.getFileName(),
                                         optionsPage.getPackageName(),
                                         optionsPage.getSelectedLanguage(),
                                         outputPage.getOutputLocation());
               CodeGenConfiguration codegenConfig = new CodeGenConfiguration(wom, optionsMap);
               monitor.worked(1);
              
               monitor.subTask(CodegenWizardPlugin.getResourceString("generator.generating"));
               new CodeGenerationEngine(codegenConfig).generate();
               monitor.worked(1);
View Full Code Here

Examples of org.apache.axis2.wsdl.codegen.CodeGenConfiguration

                                           optionsPage.getSelectedLanguage(),
                                           outputPage.getOutputLocation(),
                                           optionsPage.getNs2PkgMapping(),
                                           optionsPage.getGenerateServerSideInterface());
                
                 CodeGenConfiguration codegenConfig = new CodeGenConfiguration(service, optionsMap);
                 //set the baseURI
                 codegenConfig.setBaseURI(generator.getBaseUri(wsdlSelectionPage.getFileName()));
                 monitor.worked(1);
                
                 monitor.subTask(CodegenWizardPlugin.getResourceString("generator.generating"));
                
                 new CodeGenerationEngine(codegenConfig).generate();
View Full Code Here

Examples of org.apache.axis2.wsdl.codegen.CodeGenConfiguration

    public void testInvoke() throws Exception{
        ArrayList<XmlSchema> schemas=new ArrayList<XmlSchema>();
        loadSampleSchemaFile(schemas);
        AxisService service=new AxisService();
        service.addSchema(schemas);
        CodeGenConfiguration configuration=new CodeGenConfiguration(new HashMap<String, CommandLineOption>());
        configuration.addAxisService(service);
        ExtensionUtility.invoke(configuration);
        TypeMapper mapper=configuration.getTypeMapper();
        assertEquals(mapper.getParameterName(new QName("//www.w3schools.com", "order")), "order");
     //   assertEquals(mapper., actual)
        ByteArrayOutputStream stream =new ByteArrayOutputStream();
        Document document=(Document)mapper.getTypeMappingObject(new QName("ColorType"));
        XmlSchemaCollection schemaCol = new XmlSchemaCollection();
View Full Code Here

Examples of org.apache.axis2.wsdl.codegen.CodeGenConfiguration

                                                                                                isGenerateServerSideInterface,
                                                                                                optionsPage.getAdvanceOptions());

                 //Fix for the CodeGenConfiguration Contructor Change
                 //CodeGenConfiguration codegenConfig = new CodeGenConfiguration(service, optionsMap);
                 CodeGenConfiguration codegenConfig = new CodeGenConfiguration(optionsMap);
                 codegenConfig.addAxisService(service);
                
                 //set the wsdl definision for codegen config for skeleton generarion.
                 WSDLPropertyReader reader = new WSDLPropertyReader();
                 reader.readWSDL(wsdlSelectionPage.getFileName());
                 Definition wsdlDefinition = reader.getWsdlDefinition();
                 codegenConfig.setWsdlDefinition(wsdlDefinition);
                
                 //set the baseURI
                 codegenConfig.setBaseURI(generator.getBaseUri(wsdlSelectionPage.getFileName()));
                 monitor.worked(1);
                
                 monitor.subTask(CodegenWizardPlugin.getResourceString("generator.generating"));
                
                 new CodeGenerationEngine(codegenConfig).generate();
View Full Code Here

Examples of org.apache.axis2.wsdl.codegen.CodeGenConfiguration

    
        axisOperation.addMessage(axisMessage, "test_message");
        service.addOperation(axisOperation);
        JAXWSWapperExtension extension = new JAXWSWapperExtension();
        Map<String, CommandLineOption> optionMap = new HashMap<String, CommandLineOption>();
        CodeGenConfiguration configuration = new CodeGenConfiguration(optionMap);
        configuration.setOutputLanguage("jax-ws");
        configuration.setParametersWrapped(false);
        configuration.addAxisService(service);
        extension.engage(configuration);

    }
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.