Subversion Repositories XServices

Compare Revisions

Ignore whitespace Rev 11 → Rev 12

/xservices/trunk/src/java/net/brutex/xservices/ws/ExecuteService.java
155,11 → 155,19
long timeout) {
ExecTask exe = new ExecTask();
RunTask runner = new RunTask(exe);
 
/*
Commandline cmdl = new Commandline();
cmdl.setExecutable(executable);
cmdl.addArguments(args);
System.out.println(cmdl.describeCommand());
exe.setCommand(cmdl);
*/
exe.setExecutable(executable);
for (String s : args) {
exe.createArg().setValue(s);
}
 
exe.setDir(dir);
if (spawn) {
exe.setSpawn(spawn);
175,15 → 183,7
exe.setVMLauncher(vmlauncher);
exe.setSearchPath(searchpath);
 
Map<String, String> result = runner.postTask();
ReturnCode res = null;
if (spawn) {
res = new ReturnCode(0, null, null);
} else {
res = new ReturnCode(Integer.valueOf(result.get("ExecuteService.result")),
result.get("ExecuteService.stdout"), result.get("ExecuteService.stderr"));
}
return res;
return runner.postTask();
}
 
@WebMethod(exclude = true)
203,12 → 203,7
sshexec.setTrust(true);
sshexec.setTimeout(timeout);
sshexec.setOutputproperty("SSHExec.stdout");
Map<String, String> result = runner.postTask();
ReturnCode res = null;
res = new ReturnCode(0,
result.get("SSHExec.stdout"), "");
 
return res;
return runner.postTask();
}
 
@WebMethod(exclude = true)
230,12 → 225,7
sshexec.setTrust(true);
sshexec.setTimeout(timeout);
sshexec.setOutputproperty("SSHExec.stdout");
Map<String, String> result = runner.postTask();
ReturnCode res = null;
res = new ReturnCode(0,
result.get("SSHExec.stdout"), "");
 
return res;
return runner.postTask();
}
 
@WebMethod(exclude = true)
254,12 → 244,7
rexec.setCommand(command);
rexec.setTimeout((int) Math.round(timeout));
 
Map<String, String> result = runner.postTask();
ReturnCode res = null;
res = new ReturnCode(0,
"", "");
 
return res;
return runner.postTask();
}
 
@WebMethod(exclude = true)
281,10 → 266,6
rexec.createWrite().addText(command);
rexec.createRead().addText(expect);
 
Map<String, String> result = runner.postTask();
ReturnCode res = null;
res = new ReturnCode(0,
"", "");
return res;
return runner.postTask();
}
}