1 | // WSDL generated classes |
---|
2 | import edu.isi.www.fedd_types.*; |
---|
3 | import edu.isi.www.fedd_wsdl.*; |
---|
4 | |
---|
5 | // The fault thrown by failed commands |
---|
6 | import org.apache.axis.AxisFault; |
---|
7 | |
---|
8 | class Terminate extends FeddCommand { |
---|
9 | /** |
---|
10 | * Terminate the experiment with the menmonic name given on the command |
---|
11 | * line. |
---|
12 | */ |
---|
13 | public static void main(String args[]) throws |
---|
14 | javax.xml.rpc.ServiceException, java.net.MalformedURLException, |
---|
15 | java.rmi.RemoteException { |
---|
16 | |
---|
17 | boolean force = args.length > 2; |
---|
18 | String exptName = "test"; |
---|
19 | String urlString = "https://users.isi.deterlab.net:23235"; |
---|
20 | |
---|
21 | if (args.length > 0) exptName = args[0]; |
---|
22 | if (args.length > 1) urlString = args[1]; |
---|
23 | |
---|
24 | // Get the port and construct the (simple) request. |
---|
25 | FeddPortType port = getPort(urlString); |
---|
26 | TerminateRequestType req = new TerminateRequestType( |
---|
27 | new IDType(null, null, null, exptName, null), |
---|
28 | force); |
---|
29 | TerminateResponseType resp = null; |
---|
30 | |
---|
31 | |
---|
32 | try { |
---|
33 | /* Build the message and make the call */ |
---|
34 | resp = port.terminate(req); |
---|
35 | } |
---|
36 | catch (AxisFault f) { |
---|
37 | System.err.println("Error in Terminate: " + f); |
---|
38 | System.exit(20); |
---|
39 | } |
---|
40 | System.out.println("Terminate success: " + |
---|
41 | resp.getExperiment().getLocalname()); |
---|
42 | } |
---|
43 | } |
---|