axis_examplecompt_changesinfo-ops
Last change
on this file since 6a03b9f was
55de6a9,
checked in by Ted Faber <faber@…>, 14 years ago
|
Example of using java to talk to fedd
|
-
Property mode set to
100644
|
File size:
1.5 KB
|
Line | |
---|
1 | import edu.isi.www.fedd_types.*; |
---|
2 | import edu.isi.www.fedd_wsdl.*; |
---|
3 | import java.net.URL; |
---|
4 | import net.deterlab.isi.XTrustProvider; |
---|
5 | import net.deterlab.isi.Fedid; |
---|
6 | |
---|
7 | class MultiStatus extends FeddCommand { |
---|
8 | |
---|
9 | /** |
---|
10 | * Dummy program to test an AXIS fedd implementation generated from the |
---|
11 | * WSDL and run by axis. |
---|
12 | * It just calls terminate with a dummy id as a local name (which can be |
---|
13 | * supplied on the command line and reprints the localname that the server |
---|
14 | * replies with. A client certificate muct exist in the local keystore |
---|
15 | * file with the given password. |
---|
16 | */ |
---|
17 | public static void main(String args[]) throws |
---|
18 | javax.xml.rpc.ServiceException, java.net.MalformedURLException, |
---|
19 | java.rmi.RemoteException { |
---|
20 | |
---|
21 | FeddPortType port = getPort("https://users.isi.deterlab.net:23235"); |
---|
22 | setUpSecurity(); |
---|
23 | /* |
---|
24 | * The various parts of the MultiInfo message and response |
---|
25 | */ |
---|
26 | |
---|
27 | MultiInfoRequestType req = new MultiInfoRequestType(); |
---|
28 | MultiInfoResponseType resp = null; |
---|
29 | |
---|
30 | try { |
---|
31 | /* Build the message and make the call */ |
---|
32 | resp = port.multiInfo(req); |
---|
33 | } |
---|
34 | catch (FaultType e) { |
---|
35 | System.out.println(e); |
---|
36 | System.exit(0); |
---|
37 | } |
---|
38 | if (resp.getInfo() != null) { |
---|
39 | for (InfoResponseType info: resp.getInfo()) { |
---|
40 | ExperimentLabels el = |
---|
41 | new ExperimentLabels(info.getExperimentID()); |
---|
42 | |
---|
43 | System.out.println(el.getLocalname() + ":" + el.getFedid() |
---|
44 | +":" + info.getExperimentStatus().getValue()); |
---|
45 | } |
---|
46 | } |
---|
47 | else |
---|
48 | System.out.println("No experiments"); |
---|
49 | } |
---|
50 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.