Steps to Connect with a vSphere Server

For a connection with a vSphere server, use the following steps:
  1. Get the
    VimPort
    object for access to the vSphere services.
  2. Call the
    RetrieveServiceContent
    method.
  3. Call the
    LoginByToken
    method; insert a SAML token into the request header..
  4. Extract the session cookie from the response.
  5. Use the session cookie to set the request context for future requests.
The following sections describe these steps.