using the CopyIntoItems method of the SharePoint Copy web service

    string targetDocName ="Test1Name.txt";
   
string destinationUrl =Uri.EscapeDataString("https://someaddress.com/Reports/Temp/"+ targetDocName);
   
string[] destinationUrls ={ destinationUrl };

   
SPCopyWebService.FieldInformation i1 =newSPCopyWebService.FieldInformation{DisplayName="Title",InternalName="Title",Type=SPListTransferSpike1.SPCopyWebService.FieldType.Text,Value="Test1Title"};
   
SPCopyWebService.FieldInformation[] info ={ i1};
   
SPCopyWebService.CopyResult[] result;
   
byte[] data =File.ReadAllBytes("C:\\SomePath\\Test1Data.txt");
   
uint ret =SPCopyNew.CopyIntoItems(destinationUrl, destinationUrls, info, data,out result);



http://stackoverflow.com/questions/987581/how-do-you-use-the-copyintoitems-method-of-the-sharepoint-copy-web-service
posted @ 2012-03-22 19:36  Areas  阅读(247)  评论(0编辑  收藏  举报