/// <summary>
        /// Main method
        /// </summary>
        /// <param name="args">Expects four arguments
        /// (vCenter single sign on server url, username, password, and vCenter server url)</param>
        public static void Main(string[] args)
        {
            if (args != null && args.Length >= 4)
            {
                var ssoArgs   = new string[] { args[0], args[1], args[2] };
                var serverUrl = args[3];

                var program = new LoginByTokenSample(serverUrl);
                Console.WriteLine("------------------------------------");
                Console.WriteLine("Acquiring Bearer token");
                var xmlBearerToken =
                    AcquireBearerTokenByUserCredentialSample.AcquireBearerTokenByUserCredential.GetToken(ssoArgs);
                program.PrintToken(xmlBearerToken);
                Console.WriteLine("Performing loginByToken using the Bearer token above");
                program.LoginByToken(xmlBearerToken);
                program.PrintTime();
                program.Logout();
                Console.WriteLine("------------------------------------");
                Console.WriteLine("Acquiring HolderOfKey token");
                var xmlHokToken =
                    AcquireHoKTokenByUserCredentialSample.AcquireHoKTokenByUserCredential.GetToken(ssoArgs);
                program.PrintToken(xmlHokToken);
                Console.WriteLine("Performing loginByToken using the HolderOfKey token above");
                program.LoginByToken(xmlHokToken);
                program.PrintTime();
                program.Logout();
                Console.ReadLine();
            }
            else
            {
                //print usage
                Console.WriteLine("Usage: LoginByToken [sso url] [sso username] [sso password] [server url]");
            }
        }
        /// <summary>
        /// Main method
        /// </summary>
        /// <param name="args">Expects four arguments
        /// (vCenter single sign on server url, username, password, and vCenter server url)</param>
        public static void Main(string[] args)
        {
            if (args != null && args.Length >= 4)
            {
                var ssoArgs = new string[] { args[0], args[1], args[2] };
                var serverUrl = args[3];

                var program = new LoginByTokenSample(serverUrl);
                Console.WriteLine("------------------------------------");
                Console.WriteLine("Acquiring Bearer token");
                var xmlBearerToken =
                    AcquireBearerTokenByUserCredentialSample.AcquireBearerTokenByUserCredential.GetToken(ssoArgs);
                program.PrintToken(xmlBearerToken);
                Console.WriteLine("Performing loginByToken using the Bearer token above");
                program.LoginByToken(xmlBearerToken);
                program.PrintTime();
                program.Logout();
                Console.WriteLine("------------------------------------");
                Console.WriteLine("Acquiring HolderOfKey token");
                var xmlHokToken =
                    AcquireHoKTokenByUserCredentialSample.AcquireHoKTokenByUserCredential.GetToken(ssoArgs);
                program.PrintToken(xmlHokToken);
                Console.WriteLine("Performing loginByToken using the HolderOfKey token above");
                program.LoginByToken(xmlHokToken);
                program.PrintTime();
                program.Logout();
                Console.ReadLine();
            }
            else
            {
                //print usage
                Console.WriteLine("Usage: LoginByToken [sso url] [sso username] [sso password] [server url]");
            }
        }