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

你可能感兴趣的:(web Service)