public void validate(ToolContext env) throws ToolException {
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);
}
}
if (env.optionSet(ToolConstants.CFG_COMPILE)) {
String clsdir = (String)env.get(ToolConstants.CFG_CLASSDIR);
if (clsdir != null) {
File dir = new File(clsdir);
if (!dir.exists()) {
Message msg = new Message("DIRECTORY_NOT_EXIST", LOG, clsdir);
throw new ToolException(msg);
}
}
}
String wsdl = (String)env.get(ToolConstants.CFG_WSDLURL);
if (StringUtils.isEmpty(wsdl)) {
Message msg = new Message("NO_WSDL_URL", LOG);
throw new ToolException(msg);
}
env.put(ToolConstants.CFG_WSDLURL, URIParserUtil.normalize(wsdl));
if (!env.containsKey(ToolConstants.CFG_WSDLLOCATION)) {