public String ssoLogin(String samlAssertionXML) throws KeyManagementException, UnrecoverableKeyException, NoSuchAlgorithmException, KeyStoreException, VCloudException { String token = null; VcloudClient.setLogLevel(Level.ALL); VcloudClient vcloudClient = new VcloudClient("https://vcdurl", version); vcloudClient.registerScheme("https", 443, FakeSSLSocketFactory.getInstance()); vcloudClient.ssoLogin(samlAssertionXML, "samltest"); token = vCloudClient.getVcloudToken(); if (token == null) { logger.log(Level.SEVERE, "Authentication failure to vCloud: {0}", connectionParameter.getvCloudURL()); } else { // Set default session timeout vCloudClient.setConnectionTimeout(SESSION_TIMEOUT); logger.log(Level.INFO, "Authentication succeeded to vCloud: {0}", connectionParameter.getvCloudURL()); } return token; }