throw new ToolException(ex.getMessage(), ex.getCause());
}
}
private void initialise(ProcessorEnvironment env) throws ToolException {
CommandDocument doc = super.getCommandDocument();
if (env.optionSet(ToolConstants.CFG_BINDING)) {
env.put(ToolConstants.CFG_BINDING, doc.getParameter("binding"));
}
if (env.optionSet(ToolConstants.CFG_PORTTYPE)) {
env.put(ToolConstants.CFG_PORTTYPE, doc.getParameter("porttype"));
}
if (env.optionSet(ToolConstants.CFG_WSDLURL)) {
String wsdlname = doc.getParameter("wsdlurl");
env.put(ToolConstants.CFG_WSDLURL, wsdlname);
}
if (env.optionSet(ToolConstants.CFG_NAMESPACE)) {
env.put(ToolConstants.CFG_NAMESPACE, doc.getParameter("namespace"));
}
if (env.optionSet(ToolConstants.CFG_OUTPUTFILE)) {
String[] outputs = doc.getParameters("outputfile");
for (int i = 0; i < outputs.length; i++) {
if (outputs[i].endsWith(".wsdl")) {
env.put(ToolCorbaConstants.CFG_WSDLOUTPUT, outputs[i]);
} else if (outputs[i].endsWith(".idl")) {
env.put(ToolCorbaConstants.CFG_IDLOUTPUT, outputs[i]);
}
}
}
if (env.optionSet(ToolConstants.CFG_OUTPUTDIR)) {
env.put(ToolConstants.CFG_OUTPUTDIR, doc.getParameter("outputdir"));
}
// need to add wrapped
}