Subversion Repositories XServices

Rev

Rev 16 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
16 brianR 1
/*
2
 *   Copyright 2010 Brian Rosenberger (Brutex Network)
3
 *
4
 *   Licensed under the Apache License, Version 2.0 (the "License");
5
 *   you may not use this file except in compliance with the License.
6
 *   You may obtain a copy of the License at
7
 *
8
 *       http://www.apache.org/licenses/LICENSE-2.0
9
 *
10
 *   Unless required by applicable law or agreed to in writing, software
11
 *   distributed under the License is distributed on an "AS IS" BASIS,
12
 *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
 *   See the License for the specific language governing permissions and
14
 *   limitations under the License.
15
 */
16
 
17
package net.brutex.xservices.ws;
18
 
19
import javax.jws.WebService;
20
import net.brutex.xservices.types.ReturnCode;
17 brianR 21
import net.brutex.xservices.util.RunTask;
22
import org.apache.tools.ant.taskdefs.HostInfo;
16 brianR 23
 
24
/**
25
 *
26
 * @author Brian Rosenberger, bru@brutex.de
27
 */
28
@WebService(endpointInterface="net.brutex.xservices.ws.MiscService",
29
serviceName="MiscService")
30
public class MiscServiceImpl implements MiscService {
31
 
32
    public ReturnCode getHostinfo(String hostname) {
17 brianR 33
        return antGetHostinfo(hostname, "");
16 brianR 34
    }
35
 
17 brianR 36
    private ReturnCode antGetHostinfo(String hostname, String prefix) {
37
        HostInfo info = new HostInfo();
38
        info.setTaskName("HostInfo");
39
        RunTask runner = new RunTask(info);
40
        info.setHost(hostname);
41
        info.setPrefix(prefix);
42
        return runner.postTask();
16 brianR 43
    }
44
 
45
}