source: axis/MultiStatus.java @ b8d69ec

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

Commented and working.

  • Property mode set to 100644
File size: 1.3 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
8class MultiStatus extends FeddCommand {
9
10    /**
[709306c]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.
[55de6a9]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
[709306c]23        // Make the call: the request is basically empty
[55de6a9]24        try {
25            resp = port.multiInfo(req);
26        }
[709306c]27        catch (AxisFault e) {
28            System.out.println("Request failed: " + e);
29            System.exit(20);
[55de6a9]30        }
[709306c]31
32        // Parse out the response and print the lines.
[55de6a9]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.