protected void generate(StringToStringMap values, ToolHost toolHost, Interface modelItem) throws Exception { String wsimportDir = SoapUI.getSettings().getString(ToolsSettings.JBOSSWS_WSTOOLS_LOCATION, null); if (Tools.isEmpty(wsimportDir)) { UISupport.showErrorMessage( "JBossWS wstools/wsconsume directory must be set in global preferences"); return; } String wsimportExtension = UISupport.isWindows() ? ".bat" : ".sh"; File wscompileFile = new File(wsimportDir + File.separatorChar + "wsconsume" + wsimportExtension); if (!wscompileFile.exists()) { UISupport.showErrorMessage("Could not find wsconsume script at [" + wscompileFile + "]"); return; } ProcessBuilder builder = new ProcessBuilder(); ArgumentBuilder args = buildArgs(UISupport.isWindows(), modelItem); builder.command(args.getArgs()); builder.directory(new File(wsimportDir)); toolHost.run(new ProcessToolRunner(builder, "JBossWS wsconsume", modelItem)); }
protected void generate(StringToStringMap values, ToolHost toolHost, WsdlProject project) throws Exception { String wstoolsDir = SoapUI.getSettings().getString(ToolsSettings.JBOSSWS_WSTOOLS_LOCATION, null); if (Tools.isEmpty(wstoolsDir)) { UISupport.showErrorMessage("wstools directory must be set in global preferences"); return; } String wsToolsExtension = UISupport.isWindows() ? ".bat" : ".sh"; File wstoolsFile = new File(wstoolsDir + File.separatorChar + "wstools" + wsToolsExtension); if (!wstoolsFile.exists()) { UISupport.showErrorMessage("Could not find wstools script at [" + wstoolsFile + "]"); return; } ProcessBuilder builder = new ProcessBuilder(); ArgumentBuilder args = buildArgs(values, UISupport.isWindows()); builder.command(args.getArgs()); builder.directory(new File(wstoolsDir)); toolHost.run( new ToolRunner(builder, new File(values.get(OUTPUT)), values.get(SERVICE_NAME), project)); }