public JavaToWSContainer(ToolSpec toolspec) throws Exception {
super(TOOL_NAME, toolspec);
}
public void execute(boolean exitOnFinish) throws ToolException {
Processor processor = null;
ErrorVisitor errors = new ErrorVisitor();
try {
super.execute(exitOnFinish);
checkParams(errors);
if (!hasInfoOption()) {
ToolContext env = new ToolContext();
env.setParameters(getParametersMap(new HashSet()));
if (isVerboseOn()) {
env.put(ToolConstants.CFG_VERBOSE, Boolean.TRUE);
}
processor = new JavaToWSDLProcessor();
processor.setEnvironment(env);
processor.process();
String ft = (String)env.get(ToolConstants.CFG_FRONTEND);
if (ft == null || "jaxws".equals(ft.toLowerCase())) {
ft = "jaxws";
env.put(ToolConstants.CFG_FRONTEND, "jaxws");
if (env.optionSet(ToolConstants.CFG_SERVER) || env.optionSet(ToolConstants.CFG_CLIENT)) {
processor = new JAXWSFrontEndProcessor();
processor.setEnvironment(env);
processor.process();
}
} else {
ft = "simple";
env.put(ToolConstants.CFG_FRONTEND, "simple");
processor = new SimpleFrontEndProcessor();
processor.setEnvironment(env);
processor.process();
}
}
} catch (ToolException ex) {
if (ex.getCause() instanceof BadUsageException) {
printUsageException(TOOL_NAME, (BadUsageException)ex.getCause());