You can specify username and password credentials to establish a session with a vCenter Server. The following steps describe how a client application specifies username and password credentials for access to a vCenter Server.
Procedure
- Create a connection to the vSphere server Web service.
- Instantiate a local proxy object for reference to ServiceInstance. Use this local proxy object to retrieve the ServiceContent object from the server. ServiceContent contains a reference to the root folder for the inventory and references to the managed objects that provide the vSphere services.
- Instantiate a local proxy object for access to vSphere API methods.
- Log in to the server using appropriate credentials (user account, password, and optionally the locale).
- Access server-side objects to retrieve data and perform management operations.
- Close the connection.