The example is based on the code in the ConnectionWorkflow Java class from the com.vmware.vcloud.suite.samples.workflow package. The source file is located in the following vCloud Suite SDK for Java directory: VMware-vCloud-Suite-SDK-Java/client/samples/java.
This example uses the steps that are described in the Retrieve a SAML Token procedure.
import com.vmware.vcloud.suite.samples.common.SSOConnection; import com.vmware.vapi.saml.SamlToken; ... String ssoUrl = lookupService.findSsoUrl(); // Create a connection objects to communicate with the vCenter Single Sign-On service. SSOConnection ssoConnection = getSSOConnection(ssoUrl); // Send user credentials to acquire a bearer SAML token. ssoConnection.login(ssoUsername, ssoPassword); SamlToken samlBearerToken = ssoConnection.getSamlBearerToken();