簡體   English   中英

SharePoint文檔庫版本控制,並要求使用Web服務進行檢出設置

[英]SharePoint document library versioning and require check out settings using web services

我需要有關SharePoint文檔庫的信息。 即,無論版本控制是打開還是關閉以及是否選擇了“需要簽出”選項,我都需要信息。 我必須使用SharePoint Web服務。

我在Versions.asmx,Lists.asmx和SiteData.asmx中進行了查找,但是找不到適合我需要的方法或屬性。

有人可以幫我嗎? 謝謝。

您將需要使用lists.asmx GetList方法。 它返回有關列表的所有元數據。

這是我與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()

希望這可以幫助!

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM