I'm unable to use the above logic . Could you please help me out to find out the solution for "peer not authenticated" issue.
Could you please post the full logic for the following logic.
Thanks in Advance.
package com.vmware.vco;
import java.net.URI;
import java.net.URISyntaxException;
import com.vmware.o11n.sdk.rest.client.DefaultVcoSessionFactory;
import com.vmware.o11n.sdk.rest.client.SsoAuthenticator;
import com.vmware.o11n.sdk.rest.client.VcoSession;
import com.vmware.o11n.sdk.rest.client.VcoSessionFactory;
import com.vmware.o11n.sdk.rest.client.authentication.Authentication;
import com.vmware.o11n.sdk.rest.client.authentication.UsernamePasswordAuthentication;
import com.vmware.o11n.sdk.rest.client.examples.AbstractParams;
import com.vmware.o11n.sdk.rest.client.services.ExecutionContextBuilder;
import com.vmware.o11n.sdk.rest.client.services.ExecutionService;
import com.vmware.o11n.sdk.rest.client.services.WorkflowService;
import com.vmware.o11n.sdk.rest.client.stubs.ExecutionContext;
import com.vmware.o11n.sdk.rest.client.stubs.Workflow;
public class ConnectionTest {
public static void main(String[] args) {
// TODO Auto-generated method stub
VcoSession session;
System.out.println("starting test");
try {
session = DefaultVcoSessionFactory.newLdapSession(new URI(
"https://10.25.49.38:8281/api/"), "vcoadmin", "vcoadmin");
// create the services
WorkflowService workflowService = new WorkflowService(session);
ExecutionService executionService = new ExecutionService(session);
// find a workflow by ID
Workflow workflow = workflowService.getWorkflow("1231235");
// create an ExecutionContext from the user's input
ExecutionContext context = new ExecutionContextBuilder()
.addParam("name", "Jerry").addParam("age", 18).build();
} catch (URISyntaxException e) {
e.printStackTrace();
}
System.out.println("Exiting test");
}
}