Sample Code for a Java Client to the Web Services SDK
The code examples in the following sections show how to use the
LoginByToken
method with a holder-of-key security token. The code examples are based on the sample code contained in the vCenter Single Sign On SDK. The files are located in the Java samples directory (SDK/ssoclient/java/JAXWS/samples
):- LoginByToken sample:samples/com/vmware/vsphere/samples/LoginByTokenSample.java
- Header cookie handlers:samples/com/vmware/vsphere/soaphandlers/HeaderCookieHandler.javasamples/com/vmware/vsphere/soaphandlers/HeaderCookieExtractionHandler.java
- SOAP header handlers. These are the same handlers that are used in the vCenter Single Sign-On example invCenter Single Sign On Programming Guide. The SOAP handler files are contained in the vCenter Single Sign-On SDK and are located in the SSO clientsoaphandlersdirectory:SDK/ssoclient/java/JAXWS/samples/com/vmware/sso/client/soaphandlers