source: axis/Terminate.java @ 9b76f1a

axis_examplecompt_changesinfo-ops
Last change on this file since 9b76f1a was 72176de2, checked in by Ted Faber <faber@…>, 14 years ago

Allow commits with force.

  • Property mode set to 100644
File size: 1.0 KB
RevLine 
[709306c]1// WSDL generated classes
[55de6a9]2import edu.isi.www.fedd_types.*;
3import edu.isi.www.fedd_wsdl.*;
[709306c]4
5// The fault thrown by failed commands
6import org.apache.axis.AxisFault;
[55de6a9]7
[6a03b9f]8class 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
[72176de2]17        boolean force = args.length > 1;
18
[709306c]19        // Get the port and construct the (simple) request.
20        FeddPortType port = getPort("https://users.isi.deterlab.net:23235");
[6a03b9f]21        TerminateRequestType req = new TerminateRequestType(
[55de6a9]22                new IDType(null, null, null, args[0], null), 
[72176de2]23                force);
[6a03b9f]24        TerminateResponseType resp = null;
[55de6a9]25
26
27        try {
28            /* Build the message and make the call */
[6a03b9f]29            resp = port.terminate(req);
[55de6a9]30        }
[709306c]31        catch (AxisFault f) {
[6a03b9f]32            System.err.println("Error in Terminate: " + f);
[55de6a9]33            System.exit(20);
34        }
[6a03b9f]35        System.out.println("Terminate success: " + 
36                resp.getExperiment().getLocalname());
[55de6a9]37    }
38}
Note: See TracBrowser for help on using the repository browser.