use of org.apache.cxf.tools.corba.common.ProcessorEnvironment in project cxf by apache.
the class IDLToWSDL method execute.
public void execute(boolean exitOnFinish) {
IDLToWSDLProcessor idlProcessor = new IDLToWSDLProcessor();
ProcessorEnvironment env = null;
try {
super.execute(exitOnFinish);
if (!hasInfoOption()) {
env = new ProcessorEnvironment();
env.setParameters(getParametersMap(getArrayKeys()));
if (isVerboseOn()) {
env.put(ToolConstants.CFG_VERBOSE, Boolean.TRUE);
}
env.put(ToolConstants.CFG_CMD_ARG, args);
initialise(env);
validate(env);
idlProcessor.setEnvironment(env);
idlProcessor.process();
}
} catch (ToolException ex) {
err.println("Error : " + ex.getMessage());
if (ex.getCause() instanceof BadUsageException) {
printUsageException(TOOL_NAME, (BadUsageException) ex.getCause());
}
err.println();
if (isVerboseOn()) {
ex.printStackTrace(err);
}
throw ex;
} catch (Exception ex) {
err.println("Error : " + ex.getMessage());
err.println();
if (isVerboseOn()) {
ex.printStackTrace(err);
}
throw new ToolException(ex.getMessage(), ex.getCause());
}
}
Aggregations