source: axis/MultiStatus.java @ 5bbad08

compt_changesinfo-ops
Last change on this file since 5bbad08 was cfc4d68, checked in by Ted Faber <faber@…>, 13 years ago

Take url as a parameter for easier testing

  • Property mode set to 100644
File size: 1.4 KB
Line 
1// WSDL generated classes
2import edu.isi.www.fedd_types.*;
3import edu.isi.www.fedd_wsdl.*;
4
5// The fault thrown by failed commands
6import org.apache.axis.AxisFault;
7
8class MultiStatus extends FeddCommand {
9
10    /**
11     * Get the list of active experiments created by this user.  The list has
12     * the same format as fedd_multistatus.py - name:fedid:state.  If no
13     * experiments are active, a line to that effect is printed.
14     */
15    public static void main(String args[]) throws 
16            javax.xml.rpc.ServiceException, java.net.MalformedURLException,
17            java.rmi.RemoteException {
18       
19        String urlString = "https://users.isi.deterlab.net:23235";
20
21        if (args.length > 0) urlString = args[0];
22
23        FeddPortType port = getPort(urlString);
24        MultiInfoRequestType req = new MultiInfoRequestType();
25        MultiInfoResponseType resp = null;
26
27        // Make the call: the request is basically empty
28        try {
29            resp = port.multiInfo(req);
30        }
31        catch (AxisFault e) {
32            System.out.println("Request failed: " + e);
33            System.exit(20);
34        }
35
36        // Parse out the response and print the lines.
37        if (resp.getInfo() != null) {
38            for (InfoResponseType info: resp.getInfo()) {
39                ExperimentLabels el = 
40                    new ExperimentLabels(info.getExperimentID());
41
42                System.out.println(el.getLocalname() + ":" + el.getFedid() 
43                        +":" + info.getExperimentStatus().getValue());
44            }
45        }
46        else 
47            System.out.println("No experiments");
48    }
49}
Note: See TracBrowser for help on using the repository browser.