source: axis/Terminate.java @ 6a03b9f

axis_examplecompt_changesinfo-ops
Last change on this file since 6a03b9f was 6a03b9f, checked in by Ted Faber <faber@…>, 13 years ago

Make terminate work

  • Property mode set to 100644
File size: 1.3 KB
Line 
1import edu.isi.www.fedd_types.*;
2import edu.isi.www.fedd_wsdl.*;
3import java.net.URL;
4import net.deterlab.isi.XTrustProvider;
5
6class Terminate extends FeddCommand {
7    /**
8     * Dummy program to test an AXIS fedd implementation generated from the
9     * WSDL and run by axis.
10     * It just calls terminate with a dummy id as a local name (which can be
11     * supplied on the command line and reprints the localname that the server
12     * replies with.  A client certificate muct exist in the local keystore
13     * file with the given password.
14     */
15    public static void main(String args[]) throws 
16            javax.xml.rpc.ServiceException, java.net.MalformedURLException,
17            java.rmi.RemoteException {
18       
19        /*
20         * Boilerplate web services access stuff.
21         */
22        FeddPortType port = getPort("https://users.isi.deterlab.net:23235");
23        setUpSecurity();
24
25        /*
26         * The various parts of the Terminate message and response
27         */
28
29        TerminateRequestType req = new TerminateRequestType(
30                new IDType(null, null, null, args[0], null), 
31                false);
32        TerminateResponseType resp = null;
33
34
35        try {
36            /* Build the message and make the call */
37            resp = port.terminate(req);
38        }
39        catch (FaultType f) {
40            System.err.println("Error in Terminate: " + f);
41            System.exit(20);
42        }
43        System.out.println("Terminate success: " + 
44                resp.getExperiment().getLocalname());
45    }
46}
Note: See TracBrowser for help on using the repository browser.