使用REST Web服务更新Sharepoint列表视图

时间:2014-05-22 23:37:46

标签: rest sharepoint sharepoint-2013

我正在使用Java for SharePoint 2013开发插件,尝试使用SharePoint REST Web服务更新列表视图,但找不到任何方法。

GetListAndView方法获取视图和字段详细信息,但没有看到任何更新这些视图的内容。

作为一种解决方法,使用C#开发SharePoint解决方案并将其作为Web服务方法公开,以添加,更新,删除视图中的字段。

任何使用Web服务的指针都将受到赞赏。

使用LINK

上的MSDN帮助

尝试使用MSDN中的网址添加/更新/删除字段 HTTP:///_api/SP.AppContextSite(@target)/网络/列表(GUID '')/次( '')/ viewfields / removeviewfield( 'Jira_x0020_URL')@目标= ''

获取错误:

<m:error xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
<m:code>-1, Microsoft.SharePoint.SPException</m:code>
<m:message xml:lang="en-US">There is no app context to execute this request.</m:message>
<m:innererror>
<m:message>There is no app context to execute this request.</m:message>
<m:type>Microsoft.SharePoint.SPException</m:type>
<m:stacktrace>
at Microsoft.SharePoint.SPAppContextSite..ctor(String siteUrl)
 at Microsoft.SharePoint.ServerStub.SPAppContextSiteServerStub.InvokeConstructor(ClientValueCollection xmlargs, ProxyContext proxyContext)
 at Microsoft.SharePoint.Client.ServerStub.InvokeConstructorWithMonitoredScope(ClientValueCollection args, ProxyContext proxyContext)
 at Microsoft.SharePoint.Client.Rest.RestRequestProcessor.GetObjectFromPathRoot(Boolean mainRequestPath, EdmParserNode node, Boolean resourceEndpoint, MethodInformation& methodInfo)
 at Microsoft.SharePoint.Client.Rest.RestRequestProcessor.GetObjectFromPath(Boolean mainRequestPath, String path, String pathForErrorMessage)
 at Microsoft.SharePoint.Client.Rest.RestRequestProcessor.Process()
 at Microsoft.SharePoint.Client.Rest.RestRequestProcessor.ProcessRequest()
 at Microsoft.SharePoint.Client.Rest.RestService.ProcessQuery(Stream inputStream, IList`1 pendingDisposableContainer)
</m:stacktrace>
<m:internalexception>
<m:message>There is no app context to execute this request.</m:message>
<m:type>Microsoft.SharePoint.Client.ClientServiceException</m:type>
<m:stacktrace/>
</m:internalexception>
</m:innererror>
</m:error>

寻找REST api而不是web http url get / post。

0 个答案:

没有答案