Vous devrez utiliser la méthode lists.asmx GetList. Il renvoie toutes les métadonnées d'une liste.
Voici un code que je l'ai utilisé en combinaison avec LINQ to XML:
Private _serviceRefrence As SharePointListsService.ListsSoapClient
Dim endPoint As New ServiceModel.EndpointAddress(_serviceURL)
Dim ListID as Guid = New Guid("<<Your List Guid>>")
_serviceRefrence = New SharePointListsService.ListsSoapClient("ListsSoap", endPoint)
_serviceRefrence.ClientCredentials.Windows.ClientCredential = Credentials
_serviceRefrence.ClientCredentials.Windows.AllowedImpersonationLevel = Security.Principal.TokenImpersonationLevel.Impersonation
Dim results As XmlElement = _serviceRefrence.GetList(listID.ToString())
Dim parserResults As XDocument = XDocument.Parse(results.OuterXml)
Dim listinfo = (From list In parserResults.Descendants(XName.Get("List", "http://schemas.microsoft.com/sharepoint/soap/")) _
Select New With {.RequireCheckout = list.Attribute("RequireCheckout").Value, _
.ModerationEnabled = list.Attribute("EnableModeration").Value, _
.VersioningEnabled = list.Attribute("EnableVersioning")}).Single()
Hope this helps!
Cris, merci pour votre réponse. Y at-il un moyen de convertir cela en C#? Je ne comprends pas la syntaxe de VB. Merci pour l'aide. – Boris
Malheureusement, je n'ai pas utilisé beaucoup de Linq vers XML en C#, il me faudrait donc du temps pour comprendre comment le convertir. Fondamentalement, quand vous voyez un Dim, convertissez-le comme suit: ServiceModel.EndpointAddress endPoint = new ServiceModel.EnpointAddress (_serviceURL); BTW, j'utilise WCF pour parler à SharePoint aussi bien. –