Package org.objectweb.celtix.tools.common.toolspec.parser

Examples of org.objectweb.celtix.tools.common.toolspec.parser.CommandDocument


            throw new ToolException(ex.getMessage(), ex.getCause());
        }      
    }

    private void initialise(ProcessorEnvironment env) throws ToolException {
        CommandDocument doc = super.getCommandDocument();

        if (env.optionSet(ToolConstants.CFG_BINDING)) {
            env.put(ToolConstants.CFG_BINDING, doc.getParameter("binding"));
        }
        if (env.optionSet(ToolConstants.CFG_PORTTYPE)) {
            env.put(ToolConstants.CFG_PORTTYPE, doc.getParameter("porttype"));
        }
        if (env.optionSet(ToolConstants.CFG_WSDLURL)) {
            String wsdlname = doc.getParameter("wsdlurl");
            env.put(ToolConstants.CFG_WSDLURL, wsdlname);
        }
        if (env.optionSet(ToolConstants.CFG_NAMESPACE)) {
            env.put(ToolConstants.CFG_NAMESPACE, doc.getParameter("namespace"));
        }
        if (env.optionSet(ToolConstants.CFG_OUTPUTFILE)) {
            String[] outputs = doc.getParameters("outputfile");
            for (int i = 0; i < outputs.length; i++) {
                if (outputs[i].endsWith(".wsdl")) {
                    env.put(ToolCorbaConstants.CFG_WSDLOUTPUT, outputs[i]);
                } else if (outputs[i].endsWith(".idl")) {
                    env.put(ToolCorbaConstants.CFG_IDLOUTPUT, outputs[i]);
                }
            }
        }
       
        if (env.optionSet(ToolConstants.CFG_OUTPUTDIR)) {
            env.put(ToolConstants.CFG_OUTPUTDIR, doc.getParameter("outputdir"));
        }
        // need to add wrapped

    }
View Full Code Here


            }
        }
    }

    public void checkParams(ErrorVisitor errors) throws ToolException {
        CommandDocument doc = super.getCommandDocument();

        if (!doc.hasParameter("wsdlurl")) {
            errors.add(new ErrorVisitor.UserError("WSDL/SCHEMA URL has to be specified"));
        }
        if (errors.getErrors().size() > 0) {
            Message msg = new Message("PARAMETER_MISSING", LOG);
            throw new ToolException(msg, new BadUsageException(getUsage(), errors));
View Full Code Here

TOP

Related Classes of org.objectweb.celtix.tools.common.toolspec.parser.CommandDocument

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.