Inheritance: System.Web.Services.Protocols.SoapHttpClientProtocol
Ejemplo n.º 1
0
        /// <summary>
        /// Overrides base Initialize method.
        /// </summary>
        /// <param name="testSite">An instance of the ITestSite.</param>
        public override void Initialize(ITestSite testSite)
        {
            base.Initialize(testSite);
            testSite.DefaultProtocolDocShortName = "MS-DWSS";

            this.LoadCommonConfiguration();

            // Load SHOULDMAY configuration
            this.LoadCurrentSutSHOULDMAYConfiguration();

            this.dwsService = Proxy.CreateProxy <DwsSoap>(testSite);

            // Set default Dws service url to site collection.
            this.dwsService.Url = Common.GetConfigurationPropertyValue("SiteCollection", this.Site);

            // Set default Dws service credential to admin credential.
            string userName = Common.GetConfigurationPropertyValue("UserName", this.Site);
            string password = Common.GetConfigurationPropertyValue("Password", this.Site);
            string domain   = Common.GetConfigurationPropertyValue("Domain", this.Site);

            this.dwsService.Credentials = new NetworkCredential(userName, password, domain);

            this.SetSoapVersion(this.dwsService);

            // When request Url include HTTPS prefix, avoid closing base connection.
            // Local client will accept all certificates after executing this function.
            this.transport = Common.GetConfigurationPropertyValue <TransportProtocol>("TransportType", this.Site);
            if (this.transport == TransportProtocol.HTTPS)
            {
                Common.AcceptServerCertificate();
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Set the SOAP version according to the SoapVersion property.
        /// </summary>
        /// <param name="dwsSoap">set meeting proxy</param>
        private void SetSoapVersion(DwsSoap dwsSoap)
        {
            this.soapVersion = Common.GetConfigurationPropertyValue <SoapVersion>("SoapVersion", this.Site);

            if (this.soapVersion == SoapVersion.SOAP11)
            {
                dwsSoap.SoapVersion = SoapProtocolVersion.Soap11;
            }
            else if (this.soapVersion == SoapVersion.SOAP12)
            {
                dwsSoap.SoapVersion = SoapProtocolVersion.Soap12;
            }
            else
            {
                Site.Assume.Fail(
                    "Property SoapVersion value must be {0} or {1} at the ptfconfig file.",
                    SoapVersion.SOAP11.ToString(),
                    SoapVersion.SOAP12.ToString());
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Overrides base Initialize method.
        /// </summary>
        /// <param name="testSite">An instance of the ITestSite.</param>
        public override void Initialize(ITestSite testSite)
        {
            base.Initialize(testSite);
            testSite.DefaultProtocolDocShortName = "MS-DWSS";

            this.LoadCommonConfiguration();

            // Load SHOULDMAY configuration 
            this.LoadCurrentSutSHOULDMAYConfiguration();

            this.dwsService = Proxy.CreateProxy<DwsSoap>(testSite);

            // Set default Dws service url to site collection.
            this.dwsService.Url = Common.GetConfigurationPropertyValue("SiteCollection", this.Site);

            // Set default Dws service credential to admin credential.
            string userName = Common.GetConfigurationPropertyValue("UserName", this.Site);
            string password = Common.GetConfigurationPropertyValue("Password", this.Site);
            string domain = Common.GetConfigurationPropertyValue("Domain", this.Site);
            this.dwsService.Credentials = new NetworkCredential(userName, password, domain);

            this.SetSoapVersion(this.dwsService);

            // When request Url include HTTPS prefix, avoid closing base connection.
            // Local client will accept all certificates after executing this function. 
            this.transport = Common.GetConfigurationPropertyValue<TransportProtocol>("TransportType", this.Site);
            if (this.transport == TransportProtocol.HTTPS)
            {
                Common.AcceptServerCertificate();
            }
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Set the SOAP version according to the SoapVersion property.
        /// </summary>
        /// <param name="dwsSoap">set meeting proxy</param>
        private void SetSoapVersion(DwsSoap dwsSoap)
        {
            this.soapVersion = Common.GetConfigurationPropertyValue<SoapVersion>("SoapVersion", this.Site);

            if (this.soapVersion == SoapVersion.SOAP11)
            {
                dwsSoap.SoapVersion = SoapProtocolVersion.Soap11;
            }
            else if (this.soapVersion == SoapVersion.SOAP12)
            {
                dwsSoap.SoapVersion = SoapProtocolVersion.Soap12;
            }
            else
            {
                Site.Assume.Fail(
                    "Property SoapVersion value must be {0} or {1} at the ptfconfig file.",
                    SoapVersion.SOAP11.ToString(),
                    SoapVersion.SOAP12.ToString());
            }
        }