axis_examplecompt_changesinfo-ops
Last change
on this file since 6a03b9f was
6a03b9f,
checked in by Ted Faber <faber@…>, 13 years ago
|
Make terminate work
|
-
Property mode set to
100644
|
File size:
1.3 KB
|
Rev | Line | |
---|
[55de6a9] | 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 | |
---|
[6a03b9f] | 6 | class Terminate extends FeddCommand { |
---|
[55de6a9] | 7 | /** |
---|
| 8 | * Dummy program to test an AXIS fedd implementation generated from the |
---|
| 9 | * WSDL and run by axis. |
---|
| 10 | * It just calls terminate with a dummy id as a local name (which can be |
---|
| 11 | * supplied on the command line and reprints the localname that the server |
---|
| 12 | * replies with. A client certificate muct exist in the local keystore |
---|
| 13 | * file with the given password. |
---|
| 14 | */ |
---|
| 15 | public static void main(String args[]) throws |
---|
| 16 | javax.xml.rpc.ServiceException, java.net.MalformedURLException, |
---|
| 17 | java.rmi.RemoteException { |
---|
| 18 | |
---|
| 19 | /* |
---|
| 20 | * Boilerplate web services access stuff. |
---|
| 21 | */ |
---|
| 22 | FeddPortType port = getPort("https://users.isi.deterlab.net:23235"); |
---|
| 23 | setUpSecurity(); |
---|
| 24 | |
---|
| 25 | /* |
---|
| 26 | * The various parts of the Terminate message and response |
---|
| 27 | */ |
---|
| 28 | |
---|
[6a03b9f] | 29 | TerminateRequestType req = new TerminateRequestType( |
---|
[55de6a9] | 30 | new IDType(null, null, null, args[0], null), |
---|
[6a03b9f] | 31 | false); |
---|
| 32 | TerminateResponseType resp = null; |
---|
[55de6a9] | 33 | |
---|
| 34 | |
---|
| 35 | try { |
---|
| 36 | /* Build the message and make the call */ |
---|
[6a03b9f] | 37 | resp = port.terminate(req); |
---|
[55de6a9] | 38 | } |
---|
| 39 | catch (FaultType f) { |
---|
[6a03b9f] | 40 | System.err.println("Error in Terminate: " + f); |
---|
[55de6a9] | 41 | System.exit(20); |
---|
| 42 | } |
---|
[6a03b9f] | 43 | System.out.println("Terminate success: " + |
---|
| 44 | resp.getExperiment().getLocalname()); |
---|
[55de6a9] | 45 | } |
---|
| 46 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.