import edu.isi.www.fedd_types.*; import edu.isi.www.fedd_wsdl.*; import java.net.URL; import net.deterlab.isi.XTrustProvider; import net.deterlab.isi.Fedid; class FeddCommand { static class ExperimentLabels { protected String fedid; protected String localname; public ExperimentLabels(IDType[] experimentID) { fedid = null; localname = null; for (IDType id: experimentID) { if (id.getLocalname() != null) localname = id.getLocalname(); if (id.getFedid() != null) { byte[] rawFedid = id.getFedid(); if (rawFedid != null) { Fedid f = new Fedid(rawFedid); if ( f != null) fedid = f.toString().substring(6); } } } } String getFedid() { return fedid; } String getLocalname() { return localname; } } public static void setUpSecurity() { /* 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); } public static FeddPortType getPort(String server) throws javax.xml.rpc.ServiceException, java.net.MalformedURLException { /* * Boilerplate web services access stuff. */ FeddServiceLocator service = new FeddServiceLocator(); FeddPortType port = service.getfeddPort(new URL(server)); return port; } }