diff --git a/src/java/net/brutex/xservices/ws/ExecuteService.java b/src/java/net/brutex/xservices/ws/ExecuteService.java index bda7da4..1f4ed54 100644 --- a/src/java/net/brutex/xservices/ws/ExecuteService.java +++ b/src/java/net/brutex/xservices/ws/ExecuteService.java @@ -17,10 +17,10 @@ package net.brutex.xservices.ws; import java.io.File; -import java.util.Map; import javax.jws.WebMethod; import javax.jws.WebParam; import javax.jws.WebService; +import net.brutex.xservices.types.HostConnection; import net.brutex.xservices.types.ReturnCode; import net.brutex.xservices.util.RunTask; import org.apache.tools.ant.taskdefs.ExecTask; @@ -122,25 +122,19 @@ public class ExecuteService { } @WebMethod(operationName = "rExec") - public ReturnCode rExec(@WebParam(name = "host") String host, - @WebParam(name = "port") int port, - @WebParam(name = "username") String username, - @WebParam(name = "password") String password, + public ReturnCode rExec(@WebParam(name = "host") HostConnection host, @WebParam(name = "command") String cmd, @WebParam(name = "timeout") long timeout) { - return rexec(host, port, username, password, cmd, timeout); + return rexec(host.hostname, host.port, host.user, host.password, cmd, timeout); } @WebMethod(operationName = "telnet") - public ReturnCode runTelnet(@WebParam(name = "host") String host, - @WebParam(name = "port") int port, - @WebParam(name = "username") String username, - @WebParam(name = "password") String password, + public ReturnCode runTelnet(@WebParam(name = "host") HostConnection host, @WebParam(name = "prompt") String prompt, @WebParam(name = "command") String cmd, @WebParam(name = "expect") String expect, @WebParam(name = "timeout") long timeout) { - return telnet(host, port, username, password, cmd, timeout, prompt, expect); + return telnet(host.hostname, host.port, host.user, host.password, cmd, timeout, prompt, expect); } @WebMethod(exclude = true)