use of org.apache.cxf.tools.misc.processor.WSDLToXMLProcessor in project cxf by apache.
the class WSDLToXML method execute.
public void execute(boolean exitOnFinish) {
WSDLToXMLProcessor processor = new WSDLToXMLProcessor();
try {
super.execute(exitOnFinish);
if (!hasInfoOption()) {
ToolContext env = new ToolContext();
env.setParameters(getParametersMap(getArrayKeys()));
if (isVerboseOn()) {
env.put(ToolConstants.CFG_VERBOSE, Boolean.TRUE);
}
env.put(ToolConstants.CFG_CMD_ARG, getArgument());
validate(env);
setEnvParamDefValues(env);
processor.setEnvironment(env);
processor.process();
}
} catch (ToolException ex) {
if (ex.getCause() instanceof BadUsageException) {
printUsageException(TOOL_NAME, (BadUsageException) ex.getCause());
}
err.println();
err.println("WSDLToXML Error: " + ex.getMessage());
if (isVerboseOn()) {
ex.printStackTrace(err);
}
} catch (Exception ex) {
err.println();
err.println("WSDLToXML Error: " + ex.getMessage());
if (isVerboseOn()) {
ex.printStackTrace(err);
}
} finally {
tearDown();
}
}
Aggregations