/// <summary> /// Set the SOAP version according to the SoapVersion property. /// </summary> /// <param name="meetingProxy">set meeting proxy</param> private void SetSoapVersion(MeetingsSoap meetingProxy) { SoapVersion soapVersion = Common.GetConfigurationPropertyValue <SoapVersion>("SoapVersion", this.Site); switch (soapVersion) { case SoapVersion.SOAP11: { meetingProxy.SoapVersion = SoapProtocolVersion.Soap11; break; } default: { meetingProxy.SoapVersion = SoapProtocolVersion.Soap12; break; } } }
/// <summary> /// Overrides IAdapter's Initialize(). /// </summary> /// <param name="testSite">A parameter represents an ITestSite instance.</param> public override void Initialize(ITestSite testSite) { base.Initialize(testSite); testSite.DefaultProtocolDocShortName = "MS-MEETS"; // Initialize the MeetingSoap. this.service = Proxy.CreateProxy <MeetingsSoap>(this.Site); // Load common configuration. this.LoadCommonConfiguration(); // Load SHOULDMAY configuration this.LoadCurrentSutSHOULDMAYConfiguration(); this.service.Url = Common.GetConfigurationPropertyValue("TargetServiceUrl", this.Site); string userName = Common.GetConfigurationPropertyValue("UserName", this.Site); string password = Common.GetConfigurationPropertyValue("Password", this.Site); string domain = Common.GetConfigurationPropertyValue("Domain", this.Site); this.service.Credentials = new NetworkCredential(userName, password, domain); this.SetSoapVersion(this.service); // When request Url include HTTPS prefix, avoid closing base connection. // Local client will accept all certificates after executing this function. TransportProtocol transport = Common.GetConfigurationPropertyValue <TransportProtocol>("TransportType", this.Site); if (transport == TransportProtocol.HTTPS) { Common.AcceptServerCertificate(); } // Configure the service timeout. string soapTimeOut = Common.GetConfigurationPropertyValue("ServiceTimeOut", this.Site); // 60000 means the configure SOAP Timeout is in milliseconds. this.service.Timeout = Convert.ToInt32(soapTimeOut) * 60000; }
/// <summary> /// Overrides IAdapter's Initialize(). /// </summary> /// <param name="testSite">A parameter represents an ITestSite instance.</param> public override void Initialize(ITestSite testSite) { base.Initialize(testSite); testSite.DefaultProtocolDocShortName = "MS-MEETS"; // Initialize the MeetingSoap. this.service = Proxy.CreateProxy<MeetingsSoap>(this.Site); // Load common configuration. this.LoadCommonConfiguration(); // Load SHOULDMAY configuration this.LoadCurrentSutSHOULDMAYConfiguration(); this.service.Url = Common.GetConfigurationPropertyValue("TargetServiceUrl", this.Site); string userName = Common.GetConfigurationPropertyValue("UserName", this.Site); string password = Common.GetConfigurationPropertyValue("Password", this.Site); string domain = Common.GetConfigurationPropertyValue("Domain", this.Site); this.service.Credentials = new NetworkCredential(userName, password, domain); this.SetSoapVersion(this.service); // When request Url include HTTPS prefix, avoid closing base connection. // Local client will accept all certificates after executing this function. TransportProtocol transport = Common.GetConfigurationPropertyValue<TransportProtocol>("TransportType", this.Site); if (transport == TransportProtocol.HTTPS) { Common.AcceptServerCertificate(); } // Configure the service timeout. string soapTimeOut = Common.GetConfigurationPropertyValue("ServiceTimeOut", this.Site); // 60000 means the configure SOAP Timeout is in milliseconds. this.service.Timeout = Convert.ToInt32(soapTimeOut) * 60000; }
/// <summary> /// Set the SOAP version according to the SoapVersion property. /// </summary> /// <param name="meetingProxy">set meeting proxy</param> private void SetSoapVersion(MeetingsSoap meetingProxy) { SoapVersion soapVersion = Common.GetConfigurationPropertyValue<SoapVersion>("SoapVersion", this.Site); switch (soapVersion) { case SoapVersion.SOAP11: { meetingProxy.SoapVersion = SoapProtocolVersion.Soap11; break; } default: { meetingProxy.SoapVersion = SoapProtocolVersion.Soap12; break; } } }