简体   繁体   English

SharePoint文档库版本控制,并要求使用Web服务进行检出设置

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

I need the information about the SharePoint document library. 我需要有关SharePoint文档库的信息。 Namely, I need the info whether the versioning is turned on or off and if the "require check out" option is selected. 即,无论版本控制是打开还是关闭以及是否选择了“需要签出”选项,我都需要信息。 I have to use SharePoint web services. 我必须使用SharePoint Web服务。

I have looked up in Versions.asmx, Lists.asmx and SiteData.asmx, but found no method or properties that suit my needs. 我在Versions.asmx,Lists.asmx和SiteData.asmx中进行了查找,但是找不到适合我需要的方法或属性。

Could anyone help me out please? 有人可以帮我吗? Thanks. 谢谢。

You will need to make use of the lists.asmx GetList method. 您将需要使用lists.asmx GetList方法。 It returns all of the metadata about a list. 它返回有关列表的所有元数据。

Here's some code I've been using in combination with Linq to XML: 这是我与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! 希望这可以帮助!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用低级 web 服务将文档上传到 Sharepoint 库 - Upload Document to Sharepoint Library using low-level web services 如何使用Sharepoint API检查Sharepoint文档库是否设置了Require Approval标志? - How do I check if a Sharepoint Document Library has the Require Approval flag set, using the Sharepoint API? 使用Web服务更改SharePoint组设置 - Changing SharePoint group settings using web services 使用MOSS Web服务的SharePoint文档的权限 - Permission for a SharePoint document using MOSS web services Sharepoint API:禁用文档库的版本控制 - Sharepoint API: Disable versioning of a document library 如何使用Silverlight和客户端Web服务将文件上传到Sharepoint文档库? - How can I upload a file to a Sharepoint Document Library using Silverlight and client web-services? Sharepoint文档库支持文件夹版本控制吗? - Can Sharepoint document library support folder versioning? 如何使用 Web 服务将文档移动到 SharePoint 库中的不同文件夹 - How to move document to different folder in SharePoint library with web services 如何使用Web服务检入Sharepoint文档而无需添加必填字段? - How to Check In Sharepoint Document without Adding Required fields using Web Services? 如何使用curl从Sharepoint文档库中检出文件? - How to check-out a file from sharepoint document library using curl?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM