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