Subversion Repositories XServices

Rev

Rev 16 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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