Inheritance: System.Web.Services.Protocols.SoapHttpClientProtocol
Example #1
0
        /// <summary>
        /// This method overrides Initialize in the base class to do initialization works.
        /// </summary>
        /// <param name="testSite">The test site which delivers information to initialize the adapter.</param>
        public override void Initialize(ITestSite testSite)
        {
            base.Initialize(testSite);
            this.authwsServiceStub = Proxy.CreateProxy <AuthenticationSoap>(this.Site);

            Site.DefaultProtocolDocShortName = "MS-AUTHWS";

            // Merge the common configuration
            string conmmonConfigFileName = Common.GetConfigurationPropertyValue("CommonConfigurationFileName", this.Site);

            Common.MergeGlobalConfig(conmmonConfigFileName, this.Site);

            // Load SHOULDMAY configuration
            Common.MergeSHOULDMAYConfig(this.Site);

            this.authwsServiceStub.Url = Common.GetConfigurationPropertyValue("WindowsAuthenticationUrlForHTTP", this.Site);

            this.authwsServiceStub.SoapVersion = Common.GetConfigurationPropertyValue <SoapProtocolVersion>("SoapVersion", this.Site);

            this.authwsServiceStub.Credentials     = new NetworkCredential(Common.GetConfigurationPropertyValue("UserName", this.Site), Common.GetConfigurationPropertyValue("Password", this.Site), Common.GetConfigurationPropertyValue("Domain", this.Site));
            this.authwsServiceStub.CookieContainer = new CookieContainer();
        }