Hi Sam,
There is no need to update to 5.1U1. Here is a sample showing code how to call a REST API in SSO mode
public void ssoExample() throws URISyntaxException, IOException { URI ssoUri = new URI("https://10.23.32.208:7444/ims/STSService"); URI vcoUri = new URI("https://10.23.118.186:8281/api"); long lifeTimeSeconds = 24 * 60 * 60; // 24 hours String user = "root"; String password = "vmware"; // Obtain a session VcoSessionFactory sessionFactory = createSessionFactory(vcoUri); SsoAuthenticator authenticator = new SsoAuthenticator(ssoUri, sessionFactory, lifeTimeSeconds); Authentication auth = authenticator.createSsoAuthentication(user, password); VcoSession session = sessionFactory.newSession(auth); WorkflowService workflowService = new WorkflowService(session); Workflow workflow = workflowService.getWorkflow("123"); // provide a real workflow ID here if (workflow != null) { System.out.println("workflow found"); } else { System.out.println("workflow not found"); } } // Create insecure session factory (skip certificate validation) private VcoSessionFactory createSessionFactory(URI vcoUri) throws URISyntaxException { return new DefaultVcoSessionFactory(vcoUri) { @Override protected HostnameVerifier newHostnameVerifier() { return newUnsecureHostnameVerifier(); } @Override protected SSLContext newSSLContext() throws KeyManagementException, NoSuchAlgorithmException { return newUnsecureSSLContext(); } }; }
Hope this helps,
-Ilian