Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/305.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/sharepoint/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java SharePoint 2013如何将文件夹及其所有内容从一个位置移动到另一个位置_Java_Sharepoint_Sharepoint 2013 - Fatal编程技术网

Java SharePoint 2013如何将文件夹及其所有内容从一个位置移动到另一个位置

Java SharePoint 2013如何将文件夹及其所有内容从一个位置移动到另一个位置,java,sharepoint,sharepoint-2013,Java,Sharepoint,Sharepoint 2013,如何将文件夹及其所有内容从一个位置移动到另一个位置 使用以下代码,我已成功移动了一个文件,但无法移动该文件夹 它给出了如下错误响应 <ErrorCode>UNKNOWN</ErrorCode> <ErrorText>Value does not fall within the expected range.</ErrorText> 如果你不知道有一个工具叫。 在我的例子中,无论是从文件存储还是从其他sharepoint站点传输文件/文件夹,它都

如何将文件夹及其所有内容从一个位置移动到另一个位置

使用以下代码,我已成功移动了一个文件,但无法移动该文件夹 它给出了如下错误响应

<ErrorCode>UNKNOWN</ErrorCode>

<ErrorText>Value does not fall within the expected range.</ErrorText>

如果你不知道有一个工具叫。 在我的例子中,无论是从文件存储还是从其他sharepoint站点传输文件/文件夹,它都会将源文件夹的所有内容传输到目标。
它还保留每个文件夹上的所有用户权限。

如果确实必须使用Java,请使用REST API或列表数据服务
  DestinationUrlCollection destinationUrlCollection = new DestinationUrlCollection();
       destinationUrlCollection.getString().add("some URL");


        FieldInformation titleFieldInformation = new FieldInformation();
        titleFieldInformation.setType(FieldType.TEXT);
        titleFieldInformation.setValue("some value");

        FieldInformationCollection fields = new FieldInformationCollection();
        fields.getFieldInformation().add(titleFieldInformation);

        CopyResultCollection results = new CopyResultCollection();
        Holder resultHolder = new Holder(results);
        Holder longHolder = new Holder();

        //make the call to upload
        copySoap.copyIntoItems(sourceUrl, destinationUrlCollection, fields, bytearray, longHolder,resultHolder);