How to access lists of a sub-site in Sharepoint using web services?
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 fromhttps://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:
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"
精彩评论