【问题标题】:How to access lists of a sub-site in Sharepoint using web services?如何使用 Web 服务访问 Sharepoint 中的子站点列表?
【发布时间】:2011-06-07 04:12:53
【问题描述】:

在尝试使用 web 服务(在 powershell 上)访问我的 sharepoint 站点时遇到问题,配置如下:

  • 我的网站位于https://sharepoint.company.tld/sites/siteid/
  • WSDL 是从 https://sharepoint.company.tld/_vti_bin/Lists.asmx 获取的(重定向自 https://sharepoint.company.tld/sites/siteid/_vti_bin/Lists.asmx

在构建 Web 服务 DLL 之后(按照these 步骤),我做了一个

$list = New-Object Lists

并尝试通过它的 GUID(我知道)获取列表:

$docs = $list.GetList("GUID-HERE")

这会导致异常: 按名称检索列表是相同的。

执行$list.GetListCollection() 会返回https://sharepoint.company.tld 已知的列表,是的,我的列表不在其中。只有一些列表包含用于真实网站和类似内容的 webpart。

所以,问题来了:有什么办法可以告诉网络服务他们不应访问位于https://sharepoint.company.tld 下的列表,而是搜索位于https://sharepoint.company.tld/sites/siteid/Lists 的列表?

【问题讨论】:

  • 如果您粘贴完整的代码,我可以告诉您确切的更改位置

标签: web-services sharepoint powershell


【解决方案1】:

看看这个: http://www.nivot.org/2008/02/29/ManipulatingRemoteSharePointListsWithPowerShell.aspx

你只需要设置Url属性

$list.Url = "http://sharepoint/sites/root/subsite/_vti_bin/lists.asmx"

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-01-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多