示例#1
0
        /// <summary>
        /// Request information about the Traffic Management Center
        /// </summary>
        /// <returns>The organization id</returns>
        private string SubmitCenterActiveVerificationRequest()
        {
            var client = new TmddEnhancedServiceClient();

            var request = new CenterActiveVerificationRequest
            {
                authentication = new Authentication
                {
                    userid   = Username,
                    password = Password
                },
                organizationrequesting = new OrganizationInformation
                {
                    organizationid = 1.ToString()
                }
            };

            try
            {
                var response = client.dlCenterActiveVerificationRequest(request);
                return(response.organizationinformation.organizationid);
            }
            catch (Exception ex)
            {
                LogError(ex.Message);
                return(null);
            }
        }
示例#2
0
        /// <summary>
        /// Request information about the Traffic Management Center
        /// </summary>
        /// <returns></returns>
        private static string SubmitCenterActiveVerificationRequest()
        {
            Console.WriteLine("\nSubmitting CenterActiveVerification request...");

            var client = new TmddEnhancedServiceClient();

            var request = new CenterActiveVerificationRequest
            {
                authentication = new Authentication
                {
                    userid   = Username,
                    password = Password
                },
                organizationrequesting = new OrganizationInformation
                {
                    organizationid = 1.ToString()
                }
            };

            try
            {
                var response = client.dlCenterActiveVerificationRequest(request);
                Console.WriteLine("Center Id: {0}\nCenter Name: {1}",
                                  response.organizationinformation.organizationid,
                                  response.organizationinformation.organizationname);

                return(response.organizationinformation.organizationid);
            }
            catch (FaultException fe)
            {
                Console.WriteLine("Fault exception encountered: {0}", fe.Message);
                return(null);
            }
            catch (Exception ex)
            {
                Console.WriteLine("Exception encountered: {0}", ex.Message);
                return(null);
            }
        }