Package org.objectweb.celtix.tools.common

Examples of org.objectweb.celtix.tools.common.ToolException


        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


        String outdir = (String)env.get(ToolConstants.CFG_OUTPUTDIR);
        if (outdir != null) {
            File dir = new File(outdir);
            if (!dir.exists()) {
                Message msg = new Message("DIRECTORY_NOT_EXIST", LOG, outdir);
                throw new ToolException(msg);
            }
            if (!dir.isDirectory()) {
                Message msg = new Message("NOT_A_DIRECTORY", LOG, outdir);
                throw new ToolException(msg);
            }
        }
    }
View Full Code Here

        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

        try {
            WSDLFactory wsdlFactory = WSDLFactory.newInstance();
            definition = wsdlFactory.newDefinition();
        } catch (WSDLException e) {
            Message message =  new Message("FAIL_TO_CREATE_WSDL_DEFINITION", LOG);
            throw new ToolException(message, e);
        }
    }
View Full Code Here

        try {
            jaxbContext = JAXBRIContext.newInstance(clzzs, types, this.getTargetNameSpace(), false);

        } catch (Exception e) {
            Message message = new Message("CREATE_JAXBRICONTEXT_EXCEPTION", LOG);
            throw new ToolException(message, e);
        }

    }
View Full Code Here

                new org.objectweb.celtix.common.i18n.Message("FAIL_TO_WRITE_FILE",
                                                             LOG,
                                                             env.get(ToolConstants.CFG_OUTPUTDIR)
                                                             + System.getProperty("file.seperator")
                                                             + newName);
            throw new ToolException(msg, ioe);
        }
        return writer;
    }
View Full Code Here

            parseImports(wsdlDefinition);
            buildWSDLDefinition();
        } catch (WSDLException we) {
            org.objectweb.celtix.common.i18n.Message msg =
                new org.objectweb.celtix.common.i18n.Message("FAIL_TO_CREATE_WSDL_DEFINITION", LOG);
            throw new ToolException(msg, we);
        }

    }
View Full Code Here

        } catch (Exception e) {
            org.objectweb.celtix.common.i18n.Message msg =
                new org.objectweb.celtix.common.i18n.Message("FAIL_TO_INITIALIZE_VELOCITY_ENGINE",
                                                             LOG);
            LOG.log(Level.SEVERE, msg.toString());
            throw new ToolException(msg, e);
        }
    }
View Full Code Here

        try {
            builder.setValidating(validate);
            this.doc = builder.parse(in);
        } catch (Exception ex) {
            Message message = new Message("FAIL_TO_PARSING_TOOLSPCE_STREAM", LOG);
            throw new ToolException(message, ex);
        }
    }
View Full Code Here

            try {
                handler = (Tool)Class.forName(handlerClz).newInstance();
            } catch (Exception ex) {
                Message message = new Message("FAIL_TO_INSTANTIATE_HANDLER", LOG, handlerClz);
                throw new ToolException(message, ex);
            }
        }
        return handler;
    }
View Full Code Here

TOP

Related Classes of org.objectweb.celtix.tools.common.ToolException

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.