source: axis/MultiStatus.java @ cedf721

axis_examplecompt_changesinfo-ops
Last change on this file since cedf721 was 709306c, checked in by Ted Faber <faber@…>, 14 years ago

Commented and working.

  • Property mode set to 100644
File size: 1.3 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        FeddPortType port = getPort("https://users.isi.deterlab.net:23235");
20        MultiInfoRequestType req = new MultiInfoRequestType();
21        MultiInfoResponseType resp = null;
22
23        // Make the call: the request is basically empty
24        try {
25            resp = port.multiInfo(req);
26        }
27        catch (AxisFault e) {
28            System.out.println("Request failed: " + e);
29            System.exit(20);
30        }
31
32        // Parse out the response and print the lines.
33        if (resp.getInfo() != null) {
34            for (InfoResponseType info: resp.getInfo()) {
35                ExperimentLabels el = 
36                    new ExperimentLabels(info.getExperimentID());
37
38                System.out.println(el.getLocalname() + ":" + el.getFedid() 
39                        +":" + info.getExperimentStatus().getValue());
40            }
41        }
42        else 
43            System.out.println("No experiments");
44    }
45}
Note: See TracBrowser for help on using the repository browser.