gpt4 book ai didi

web-services - 调用 GetListItems Web 服务的 SharePoint SoapServerException

转载 作者:行者123 更新时间:2023-12-04 04:56:30 25 4
gpt4 key购买 nike

我的代码中有以下语句:

System.Xml.XmlNode items = lstWebs.GetListItems(
"Tasks", string.Empty, listQuery, listViewFields,
string.Empty, listQueryOptions, WorkspaceId);

执行此操作时,会出现以下异常:
Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown.Exception Source is:System.Web.ServicesStack Trace:at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)   at ImpersonationConsoleApp.MossLists.Lists.GetListItems(String listName, String viewName, XmlNode query, XmlNode viewFields, String rowLimit, XmlNode queryOptions, String webID) in C:\Documents and Settings\david\My Documents\_Dew02SiteCreator\DeWProjectStarter\ImpersonationConsoleApp\Web References\MossLists\Reference.cs:line 435   at ImpersonationConsoleApp.Program.DeleteTasksIfNotExist(DataRow[] drTasksdel, String siteURL) in C:\Documents and Settings\david\My Documents\_Dew02SiteCreator\DeWProjectStarter\ImpersonationConsoleApp\Program.cs:line 1384

I have confirmed the site URL and it is fine.

Could you please help on why the exception is occurring? Do I need to reset IIS?

please find the detail.

SoapException.InnerException is Null. 
However the soapExcetion.Detail.InnerText is showing: The system cannot find the file specified. (Exception from HRESULT: 0x80070002)

最佳答案

名称任务也是 url 中的实际列表名称吗?即 http://siteurl/lists/tasks ?该列表是否在子站点中?您是否正在使用站点集合下的服务?

如果列表在子站点中,则使用 http://sitecollectionurl/subsite/_vti_bin/lists.asmx作为服务 url,否则lists.asmx 将尝试在 rootweb 而不是子站点中查找任务列表。

关于web-services - 调用 GetListItems Web 服务的 SharePoint SoapServerException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1079176/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com