开发者

How to access lists of a sub-site in Sharepoint using web services?

开发者 https://www.devze.com 2023-02-03 20:22 出处:网络
I\'m experiencing problems when trying to access my sharepoint site using web services (on powershell) given the following configuration:

I'm experiencing problems when trying to access my sharepoint site using web services (on powershell) given the following configuration:

  • my site is located at https://sharepoint.company.tld/sites/siteid/
  • the WSDL was fetched from https://sharepoint.company.tld/_vti_bin/Lists.asmx (redirected from https://sharepoint.company.tld/sites/siteid/_vti_bin/Lists.asmx)

After building the web service DLL (following these steps), I do a

$list = New-Object Lists

and try to obtain a list by it's GUID (known to me):

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

This results in an exception:

How to access lists of a sub-site in Sharepoint using web services?

Retrieving the list by it's name is the same.

Doing a $list.GetListCollection() returns me the lists known by https://sharepoint.company.tld and yes, my list is not amongst these. Only some lists containing webparts that shall be used for the real sites and similar stuff.

So, here's the question: Is there any way how I could tell the web services that they shall not access a list located under https://sharepoint.company.tld 开发者_StackOverflow中文版but to search my lists located at https://sharepoint.company.tld/sites/siteid/Lists?


Check out this: http://www.nivot.org/2008/02/29/ManipulatingRemoteSharePointListsWithPowerShell.aspx

You just need to set up Url property

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

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号