protected void doFinishWSDL2Java(){
handlePragress();
new java.util.Timer(true).schedule(new TimerTask() {
public void run() {
try {
FirstPanel first=(FirstPanel)wizardComponents.getWizardPanel(1);
SecondPanel option=(SecondPanel)wizardComponents.getWizardPanel(3);
WSDL2JavaOutputPanel output=(WSDL2JavaOutputPanel)wizardComponents.getWizardPanel(5);
boolean isServerside,isServiceXML,isGenerateServerSideInterface = false;
if (option.getGenerateAll()){
isServerside = true;
isServiceXML = true;
isGenerateServerSideInterface = true;
}else{
isServerside = option.isServerside();
isServiceXML =option.isServerXML();
isGenerateServerSideInterface = option.getGenerateServerSideInterface();
}
codegenBean.setPackageName(option.getPackageName());
codegenBean.setLanguage(option.getSelectedLanguage());
codegenBean.setPortName(option.getPortName());
codegenBean.setServiceName(option.getServiceName());
codegenBean.setDatabindingName(option.getDatabinderName());
codegenBean.setAsyncOnly(option.isAsyncOnlyOn());
codegenBean.setSyncOnly(option.isSyncOnlyOn());
codegenBean.setTestCase(option.isGenerateTestCase());
codegenBean.setGenerateAll(option.getGenerateAll());
codegenBean.setServerXML(isServiceXML);
codegenBean.setServerSide(isServerside);
codegenBean.setServerSideInterface(isGenerateServerSideInterface);
codegenBean.setOutput(output.getOutputLocation());
codegenBean.setNamespace2packageList(option.getNs2PkgMapping());
codegenBean.setWSDLFileName(first.getWSDLFileName());
codegenBean.generate();
//Add the codegen libs that are coming with the plugin to the project lib that has been created
if (output.getAxis2PluginLibCopyCheckBoxSelection()){
java.net.URL resource = WizardPanel.class.getResource("/icons/icon.png");
String path =new File(resource.getPath()).getParentFile().getParentFile().getParentFile().getPath();