public void Configure(WebServicesClientProtocol proxy) { // set proxy URL string serverUrl = enterpriseServerUrl.Trim(); if (serverUrl.Length == 0) { throw new Exception("Enterprise Server URL could not be empty"); } int idx = proxy.Url.LastIndexOf("/"); // strip the last slash if any if (serverUrl[serverUrl.Length - 1] == '/') { serverUrl = serverUrl.Substring(0, serverUrl.Length - 1); } proxy.Url = serverUrl + proxy.Url.Substring(idx); // set timeout proxy.Timeout = 900000; //15 minutes // System.Threading.Timeout.Infinite; if (!String.IsNullOrEmpty(username)) { // create assertion UsernameAssertion assert = new UsernameAssertion(username, password); // apply policy Policy policy = new Policy(); policy.Assertions.Add(assert); proxy.SetPolicy(policy); } }
public void Configure(WebServicesClientProtocol proxy) { // set proxy URL string serverUrl = enterpriseServerUrl.Trim(); if (serverUrl.Length == 0) throw new Exception("Enterprise Server URL could not be empty"); int idx = proxy.Url.LastIndexOf("/"); // strip the last slash if any if (serverUrl[serverUrl.Length - 1] == '/') serverUrl = serverUrl.Substring(0, serverUrl.Length - 1); proxy.Url = serverUrl + proxy.Url.Substring(idx); // set timeout proxy.Timeout = 900000; //15 minutes // System.Threading.Timeout.Infinite; if (!String.IsNullOrEmpty(username)) { // create assertion UsernameAssertion assert = new UsernameAssertion(username, password); // apply policy Policy policy = new Policy(); policy.Assertions.Add(assert); proxy.SetPolicy(policy); } }
public ClientOutputFilter(UsernameAssertion parentAssertion, FilterCreationContext filterContext) : base(parentAssertion.ServiceActor, false, parentAssertion.ClientActor) { this.parentAssertion = parentAssertion; this.filterContext = filterContext; }