Subversion Repositories XServices

Rev

Rev 83 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 83 Rev 85
Line 35... Line 35...
35
import org.apache.tools.ant.taskdefs.HostInfo;
35
import org.apache.tools.ant.taskdefs.HostInfo;
36
import org.apache.tools.ant.taskdefs.Sleep;
36
import org.apache.tools.ant.taskdefs.Sleep;
37
import org.apache.tools.ant.taskdefs.email.EmailTask;
37
import org.apache.tools.ant.taskdefs.email.EmailTask;
Line 38... Line 38...
38
 
38
 
-
 
39
/**
39
/**
40
 * Implements the web service
40
 * 
41
 * 
41
 * @author Brian Rosenberger, bru@brutex.de
42
 * @author Brian Rosenberger, bru@brutex.de
42
 */
43
 */
-
 
44
@WebService(targetNamespace = BrutexNamespaces.WS_XSERVICES, 
-
 
45
		endpointInterface = "net.brutex.xservices.ws.MiscService", 
43
@WebService(targetNamespace = BrutexNamespaces.WS_XSERVICES, endpointInterface = "net.brutex.xservices.ws.MiscService", serviceName = "MiscService")
46
		serviceName = "MiscService")
Line 44... Line 47...
44
public class MiscServiceImpl implements MiscService {
47
public class MiscServiceImpl implements MiscService {
45
 
48
 
46
	public HostinfoType getHostinfo(String hostname) {
49
	public HostinfoType getHostinfo(String hostname) {
47
		HostInfo info = new HostInfo();
50
		HostInfo info = new HostInfo();
48
		info.setTaskName("HostInfo");
51
		info.setTaskName("HostInfo");
49
		RunTask runner = new RunTask(info);
52
		RunTask runner = new RunTask(info);
-
 
53
		info.setHost(hostname);
50
		info.setHost(hostname);
54
		// info.setPrefix(prefix);
51
		// info.setPrefix(prefix);
55
		// TODO: Does not work for IP Addresses?
52
		ReturnCode ret = runner.postTask();
56
		ReturnCode ret = runner.postTask();
53
		HostinfoType infotype = new HostinfoType(
57
		HostinfoType infotype = new HostinfoType(
54
				ret.getProperty("NAME"),
58
				ret.getProperty("NAME"),