[709306c] | 1 | // WSDL generated classes |
---|
[55de6a9] | 2 | import edu.isi.www.fedd_types.*; |
---|
| 3 | import edu.isi.www.fedd_wsdl.*; |
---|
[709306c] | 4 | |
---|
| 5 | // The fault thrown by failed commands |
---|
| 6 | import org.apache.axis.AxisFault; |
---|
[55de6a9] | 7 | |
---|
| 8 | class 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 | |
---|
[cfc4d68] | 19 | String urlString = "https://users.isi.deterlab.net:23235"; |
---|
| 20 | |
---|
| 21 | if (args.length > 0) urlString = args[0]; |
---|
| 22 | |
---|
| 23 | FeddPortType port = getPort(urlString); |
---|
[55de6a9] | 24 | MultiInfoRequestType req = new MultiInfoRequestType(); |
---|
| 25 | MultiInfoResponseType resp = null; |
---|
| 26 | |
---|
[709306c] | 27 | // Make the call: the request is basically empty |
---|
[55de6a9] | 28 | try { |
---|
| 29 | resp = port.multiInfo(req); |
---|
| 30 | } |
---|
[709306c] | 31 | catch (AxisFault e) { |
---|
| 32 | System.out.println("Request failed: " + e); |
---|
| 33 | System.exit(20); |
---|
[55de6a9] | 34 | } |
---|
[709306c] | 35 | |
---|
| 36 | // Parse out the response and print the lines. |
---|
[55de6a9] | 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 | } |
---|