我有一个文档库的自定义定义,并且我正在尝试仅使用开箱即用的web服务来重命名库中的文档。在定义了一个带有"Name“字段的视图并尝试使用"LinkFilename”之后,我对重命名文件的调用分别返回一个失败或忽略新值。
如何使用SharePoint web服务重命名文件?
发布于 2009-06-15 11:09:05
使用Lists.UpdateListItems web方法。XML请求应如下所示:
<Batch OnError="Continue" PreCalc="TRUE" ListVersion="0">
<Method ID="1" Cmd="Update">
<!-- List item ID of document -->
<Field Name="ID">2</Field>
<!-- Full URL to document -->
<Field Name="FileRef">http://Server/FullUrl/File.doc</Field>
<!-- New filename -->
<Field Name="BaseName">NewName</Field>
</Method>
</Batch>发布于 2009-06-15 01:16:16
您应该能够使用UpdateListItems。Here's an example。
Per comment:所以实际的问题是“我如何调用web服务?”看一看this example。一些更好的演练here。
https://stackoverflow.com/questions/994173
复制相似问题