Package org.objectweb.celtix.tools.processors.wsdl2.internal

Examples of org.objectweb.celtix.tools.processors.wsdl2.internal.SEIAnnotationProcessor


    private WSDLHelper wsdlHelper = new WSDLHelper();
    private File classFile;
   
    public void setUp() throws Exception {
        super.setUp();
        wj2Processor = new WSDLToJavaProcessor();
        j2wProcessor = new JavaToWSDLProcessor();
        classFile = new java.io.File(output.getCanonicalPath() + "/classes");
        classFile.mkdir();
        System.setProperty("java.class.path", getClassPath() + classFile.getCanonicalPath()
                           + File.separatorChar);
View Full Code Here


        set.add(ToolConstants.CFG_NEXCLUDE);
        return set;
    }
   
    public void execute(boolean exitOnFinish) {
        WSDLToJavaProcessor processor = new WSDLToJavaProcessor();
        try {
            super.execute(exitOnFinish);
            if (!hasInfoOption()) {
                ProcessorEnvironment env = new ProcessorEnvironment();
                env.setParameters(getParametersMap(getArrayKeys()));
                if (env.get(ToolConstants.CFG_OUTPUTDIR) == null) {
                    env.put(ToolConstants.CFG_OUTPUTDIR, ".");
                }

                if (env.containsKey(ToolConstants.CFG_ANT)) {
                    setAntProperties(env);
                    setLibraryReferences(env);
                }

                if (isVerboseOn()) {
                    env.put(ToolConstants.CFG_VERBOSE, Boolean.TRUE);
                }
                env.put(ToolConstants.CFG_CMD_ARG, args);

                validate(env);
                loadDefaultNSPackageMapping(env);
                setPackageAndNamespaces(env);
                setExcludePackageAndNamespaces(env);
               
                processor.setEnvironment(env);
                processor.process();
            }
        } catch (ToolException ex) {
            System.err.println("Error : " + ex.getMessage());
            if (ex.getCause() instanceof BadUsageException) {
                getInstance().printUsageException(TOOL_NAME, (BadUsageException)ex.getCause());
View Full Code Here

    private Set getArrayKeys() {
        return new HashSet<String>();
    }

    public void execute(boolean exitOnFinish) {
        WSDLToServiceProcessor processor = new WSDLToServiceProcessor();
        try {
            super.execute(exitOnFinish);
            if (!hasInfoOption()) {
                ProcessorEnvironment env = new ProcessorEnvironment();
                env.setParameters(getParametersMap(getArrayKeys()));

                if (isVerboseOn()) {
                    env.put(ToolConstants.CFG_VERBOSE, Boolean.TRUE);
                }

                env.put(ToolConstants.CFG_CMD_ARG, args);

                validate(env);

                processor.setEnvironment(env);
                processor.process();
            }
        } catch (ToolException ex) {
            System.err.println("Error : " + ex.getMessage());
            if (ex.getCause() instanceof BadUsageException) {
                getInstance().printUsageException(TOOL_NAME, (BadUsageException)ex.getCause());
View Full Code Here

    private Set getArrayKeys() {
        return new HashSet<String>();
    }
   
    public void execute(boolean exitOnFinish) {
        WSDLToSoapProcessor processor = new WSDLToSoapProcessor();
        try {
            super.execute(exitOnFinish);
            if (!hasInfoOption()) {
                ProcessorEnvironment env = new ProcessorEnvironment();
                env.setParameters(getParametersMap(getArrayKeys()));
                if (isVerboseOn()) {
                    env.put(ToolConstants.CFG_VERBOSE, Boolean.TRUE);
                }
                env.put(ToolConstants.CFG_CMD_ARG, args);

                validate(env);      
                setEnvParamDefValues(env);
               
                processor.setEnvironment(env);
                processor.process();
            }
        } catch (ToolException ex) {
            System.err.println("Error : " + ex.getMessage());
            if (ex.getCause() instanceof BadUsageException) {
                getInstance().printUsageException(TOOL_NAME, (BadUsageException)ex.getCause());
View Full Code Here

    private Set getArrayKeys() {
        return new HashSet<String>();
    }
   
    public void execute(boolean exitOnFinish) {
        WSDLToXMLProcessor processor = new WSDLToXMLProcessor();
        try {
            super.execute(exitOnFinish);
            if (!hasInfoOption()) {
                ProcessorEnvironment env = new ProcessorEnvironment();
                env.setParameters(getParametersMap(getArrayKeys()));
                if (isVerboseOn()) {
                    env.put(ToolConstants.CFG_VERBOSE, Boolean.TRUE);
                }
                env.put(ToolConstants.CFG_CMD_ARG, args);

                validate(env);      
                setEnvParamDefValues(env);
               
                processor.setEnvironment(env);
                processor.process();
            }
        } catch (ToolException ex) {
            System.err.println("Error : " + ex.getMessage());
            if (ex.getCause() instanceof BadUsageException) {
                getInstance().printUsageException(TOOL_NAME, (BadUsageException)ex.getCause());
View Full Code Here

            String arg = (String)obj;
            args[i] = arg;
            i++;
        }

        Compiler compiler = new Compiler(System.out);

        if (!compiler.internalCompile(args)) {
            Message msg = new Message("FAIL_TO_COMPILE_GENERATE_CODES", LOG);
            throw new ToolException(msg);
        }

    }
View Full Code Here

    protected void init() throws ToolException {
        parseWSDL((String)env.get(ToolConstants.CFG_WSDLURL));
        parseCustomization();
        initVelocity();
        classColletor = new ClassCollector();
        env.put(ToolConstants.GENERATED_CLASS_COLLECTOR, classColletor);

        initJAXBModel();

    }
View Full Code Here

        }
        return binding;
    }

    private void compile() throws ToolException {
        ClassCollector classCollector = (ClassCollector)env.get(ToolConstants.GENERATED_CLASS_COLLECTOR);
        List<String> argList = new ArrayList<String>();

        String javaClasspath = System.getProperty("java.class.path");
        // hard code celtix.jar
        boolean classpathSetted = javaClasspath != null && (javaClasspath.indexOf("celtix.jar") >= 0);
        if (env.isVerbose()) {
            argList.add("-verbose");
        }

        if (!classpathSetted) {
            System.setProperty("java.ext.dirs", this.getClass().getClassLoader().getResource(".").getFile()
                                                + "../lib/");
        } else {
            argList.add("-classpath");
            argList.add(javaClasspath);
        }

        if (env.get(ToolConstants.CFG_CLASSDIR) != null) {
            argList.add("-d");
            argList.add((String)env.get(ToolConstants.CFG_CLASSDIR));
        }

        Set<String> dirSet = new HashSet<String>();
        Iterator ite = classCollector.getGeneratedFileInfo().iterator();
        while (ite.hasNext()) {
            String fileName = (String)ite.next();
            fileName = fileName.replaceAll("\\.", "/");
            String dirName = fileName.substring(0, fileName.lastIndexOf("/") + 1);
            String outPutDir = (String)env.get(ToolConstants.CFG_OUTPUTDIR);
View Full Code Here

    }

    @SuppressWarnings("unchecked")
    private void buildJaxbModel() {
        SchemaCompiler schemaCompiler = XJC.createSchemaCompiler();
        ClassNameAllocatorImpl allocator = new ClassNameAllocatorImpl(classColletor);

        allocator.setPortTypes(wsdlDefinition.getPortTypes().values(), env.mapPackageName(this.wsdlDefinition
            .getTargetNamespace()));
        schemaCompiler.setClassNameAllocator(allocator);
        schemaCompiler.setErrorListener(this);

        SchemaCompiler schemaCompilerGenCode = schemaCompiler;
View Full Code Here

        Map portTypes = definition.getPortTypes();

        for (Iterator iter = portTypes.keySet().iterator(); iter.hasNext();) {
            PortType portType = (PortType)portTypes.get(iter.next());
            PortTypeProcessor portTypeProcessor = new PortTypeProcessor(getEnvironment());
            portTypeProcessor.process(javaModel, portType);
        }

        ServiceProcessor serviceProcessor = new ServiceProcessor(env, getWSDLDefinition());
        serviceProcessor.process(javaModel);
View Full Code Here

TOP

Related Classes of org.objectweb.celtix.tools.processors.wsdl2.internal.SEIAnnotationProcessor

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.