private void Init(SPWeb spWeb) { IMapManager mapManager = null; if (spWeb != null && spWeb.Site != null) { var binding = new BasicHttpBinding(); binding.ReaderQuotas.MaxStringContentLength = 2147483647; binding.Security.Mode = BasicHttpSecurityMode.TransportCredentialOnly; binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Ntlm; binding.MaxReceivedMessageSize = 2147483647; //Note in the future it may be necessary to handle in a configuration file what zone to use if the Default zone doesn't support Windows NTLM authentication. Uri siteUri = new Uri(spWeb.Site.Url + "/"); Uri combinedUri = new Uri(siteUri, "_vti_bin/sevensigma/transactionalmappingtoolservice.svc"); var address = new EndpointAddress(combinedUri); CallingUrl.Url = spWeb.Url; var client = new TransactionalMappingToolServiceClient(binding, address); NetworkCredential credentials = CredentialCache.DefaultNetworkCredentials; client.ClientCredentials.Windows.AllowedImpersonationLevel = TokenImpersonationLevel.Impersonation; client.ClientCredentials.Windows.ClientCredential = credentials; mapManager = new SoapMapManager(client, true); mapManager.InitialiseMapManagerCompleted += mapManager_InitialiseMapManagerCompleted; mapManager.InitialiseMapManagerAsync(); Completed.WaitOne(_mapManagerTimeout); } }
public InMemoryGraph(SoapMapManager mapManager) { MapManager = mapManager; }
public SoapRelationshipManager(SoapMapManager mapManager) { MapManager = mapManager; }
public SoapNodeManager(SoapMapManager mapManager) { MapManager = mapManager; }
private void InitMapManager() { ProgressRecord progressRecord = new ProgressRecord(0, "Exporting Glyma Map", "Initialising web service client"); progressRecord.SecondsRemaining = -1; progressRecord.PercentComplete = 0; progressRecord.RecordType = ProgressRecordType.Processing; lock (pr_lock) { this.ProgressRecord = progressRecord; ProgressEvent.Set(); //notify of change to progress } var binding = new BasicHttpBinding(); binding.ReaderQuotas.MaxStringContentLength = 2147483647; binding.Security.Mode = BasicHttpSecurityMode.TransportCredentialOnly; binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Ntlm; binding.MaxReceivedMessageSize = 2147483647; var address = new EndpointAddress(new Uri(ServiceUrl)); CallingUrl.Url = Identity; var client = new TransactionalMappingToolServiceClient(binding, address); System.Net.NetworkCredential credential = new System.Net.NetworkCredential(SharePointUsername, SharePointPassword); client.ClientCredentials.Windows.AllowedImpersonationLevel = System.Security.Principal.TokenImpersonationLevel.Impersonation; client.ClientCredentials.Windows.ClientCredential = credential; MapManager = new SoapMapManager(client, true); MapManager.InitialiseMapManagerCompleted += OnInitialiseMapManagerCompleted; MapManager.InitialiseMapManagerAsync(); }