import edu.isi.www.fedd_types.*; import edu.isi.www.fedd_wsdl.*; import java.net.URL; import net.deterlab.isi.XTrustProvider; class Create extends FeddCommand { /** * Dummy program to test an AXIS fedd implementation generated from the * WSDL and run by axis. * It just calls terminate with a dummy id as a local name (which can be * supplied on the command line and reprints the localname that the server * replies with. A client certificate muct exist in the local keystore * file with the given password. */ public static void main(String args[]) throws javax.xml.rpc.ServiceException, java.net.MalformedURLException, java.rmi.RemoteException { /* * Boilerplate web services access stuff. */ FeddPortType port = getPort("https://users.isi.deterlab.net:23235"); setUpSecurity(); /* * The various parts of the MultiInfo message and response */ NewResponseType resp = null; /* This magic turns off certificate chain checking. */ XTrustProvider.install(); /* This tells the SSL system where to find client certificate * information. */ String keyStore = "./keystore"; String keyStorePassword = "importkey"; System.setProperty("javax.net.ssl.keyStore", keyStore); System.setProperty("javax.net.ssl.keyStorePassword", keyStorePassword); IDType id = new IDType(); NewRequestType req = new NewRequestType(null, new IDType(null, null, null, args[0], null), null); try { /* Build the message and make the call */ resp = port._new(req); } catch (FaultType f) { System.err.println("Error in New: " + f); System.exit(20); } ExperimentLabels newLabels = new ExperimentLabels(resp.getExperimentID()); System.out.println("New success: " + newLabels.getLocalname() + "(" + newLabels.getFedid() + ")"); } }