【发布时间】:2009-12-16 15:02:09
【问题描述】:
我正在尝试使用 Copy.asmx 网络服务、CopyIntoItems 方法从本地计算机上传文档。我可以成功上传文档和 DateTime 属性,但无法更新文档库的查找属性。我正在使用带有 sp2 的 MOSS 2007
我使用的代码如下所示:
string[] destinationUrls = { Uri.EscapeUriString(destinationUrl) };
CopySharepointService.FieldInformation dateInformation = new CopySharepointService.FieldInformation();
dateInformation.DisplayName = "Date";
dateInformation.Type = CopySharepointService.FieldType.DateTime;
dateInformation.Value = DateTime.Today.ToString();
CopySharepointService.FieldInformation fundInformation = new CopySharepointService.FieldInformation();
fundInformation.DisplayName = "Fund";
fundInformation.Type = CopySharepointService.FieldType.Lookup;
fundInformation.Id = new Guid(fundGuidItem); // This is the GUID of the field being updated in the document library
fundInformation.Value = "1";
CopySharepointService.FieldInformation[] info = { dateInformation, fundInformation };
CopySharepointService.CopyResult[] result;
CopySharepointService.CopySoapClient CopyService2007 = new CopySoapClient("CopySoap");
CopyService2007.ClientCredentials.Windows.ClientCredential = CredentialCache.DefaultNetworkCredentials;
CopyService2007.CopyIntoItems(destinationUrl, destinationUrls, info, fileData, out result);
文档已成功上传,但查阅字段未更新
有人可以帮忙吗?
【问题讨论】:
标签: web-services sharepoint-2007