O esquema de URI fornecido 'https' é inválido; esperado 'http' ao chamar o serviço da web
Eu estou tentando chamar um serviço da web do SharePoint de um fluxo de trabalho do CRM usando o código personalizado C #. No entanto, quando executo meu código, recebo o seguinte erro:
The provided URI scheme 'https' is invalid; expected 'http'. Parameter name: via
Aqui está o código incorreto:
#region Set up security binding and service endpoint
BasicHttpBinding binding = new BasicHttpBinding(BasicHttpSecurityMode.TransportCredentialOnly);
binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Ntlm;
binding.Security.Transport.ProxyCredentialType = HttpProxyCredentialType.Ntlm;
EndpointAddress endpoint = new EndpointAddress(endpointAddress);
#endregion
#region Create the client and supply appropriate credentials
CopySPContents.CopyService.SharepointFileServiceClient client = new CopySPContents.CopyService.SharepointFileServiceClient(binding, endpoint);
client.ClientCredentials.Windows.ClientCredential = System.Net.CredentialCache.DefaultNetworkCredentials;
client.ClientCredentials.Windows.AllowedImpersonationLevel = System.Security.Principal.TokenImpersonationLevel.Impersonation;
#endregion
#region Call the web service and trace its response
String response = client.CopyFolderContentsAcrossSites(sourceSiteURL, sourceFolderURL, destinationSiteURL, destinationFolderURL);
#endregion
O erro é jogado na linhaString response = client.CopyFolderContentsAcrossSites(sourceSiteURL, sourceFolderURL, destinationSiteURL, destinationFolderURL);
onde o método do cliente é chamado.
Obrigado por qualquer ajuda,
Scott