ReportingService2006.MoveItem(String, String) 메서드

정의

항목을 이동하거나 항목 이름을 바꿉니다.

public:
 void MoveItem(System::String ^ Item, System::String ^ Target);
public void MoveItem (string Item, string Target);
member this.MoveItem : string * string -> unit
Public Sub MoveItem (Item As String, Target As String)

매개 변수

Item
String

파일 이름과 확장명을 포함하는 항목의 정규화된 URL입니다.

Target
String

파일 이름과 확장명을 포함하는 항목의 정규화된 새 URL입니다.

예제

using System;  
using System.Collections.Generic;  
using System.IO;  
using System.Text;  
using System.Web;  
using System.Web.Services;  
using System.Web.Services.Protocols;  

class Sample  
{  
    static void Main(string[] args)  
    {  
        ReportingService2006 rs = new ReportingService2006();  
        rs.Url = "http://<Server Name>/_vti_bin/ReportServer/" +  
            "ReportService2006.asmx";  
        rs.Credentials =   
            System.Net.CredentialCache.DefaultCredentials;  

        string currentPath = "http://<Server Name>/Docs/Documents" +  
            "/Data Sources/Sales Order Detail.rdl";  
        string targetPath = "http://<Server Name>/Docs/Documents/" +  
            "AdventureWorks Sample Reports/Sales Order Detail.rdl";  

        try  
        {  
            rs.MoveItem(currentPath, targetPath);  
        }  

        catch (SoapException e)  
        {  
            Console.WriteLine(e.Detail.OuterXml);  
        }  
    }  
}  
Imports System  
Imports System.IO  
Imports System.Text  
Imports System.Web.Services  
Imports System.Web.Services.Protocols  

Class Sample  

    Public Shared Sub Main()  

        Dim rs As New ReportingService2006()  
        rs.Url = "http://<Server Name>/_vti_bin/ReportServer/" + _  
            "ReportService2006.asmx"  
        rs.Credentials = _  
            System.Net.CredentialCache.DefaultCredentials  

        Dim currentPath As String = "http://<Server Name>/Docs/" + _  
            "Documents/AdventureWorks Sample Reports/Sales Order Detail.rdl"  
        Dim targetPath As String = "http://<Server Name>/Docs/" + _  
            "Documents/Data Sources/Sales Order Detail.rdl"  

        Try  
            rs.MoveItem(currentPath, targetPath)  

        Catch e As SoapException  
            Console.WriteLine(e.Detail.OuterXml)  
        End Try  

    End Sub  

End Class  

설명

다음 표에서는 이 작업에 대한 헤더 및 사용 권한 정보를 보여 줍니다.

SOAP 헤더 (In) TrustedUserHeaderValue

(Out) ServerInfoHeaderValue
필요한 권한 <xref:Microsoft.SharePoint.SPBasePermissions.EditListItems> 의 Item 부모 폴더에 있는 AND <xref:Microsoft.SharePoint.SPBasePermissions.AddListItems> ( Target 대상 부모 폴더가 다른 경우)

항목이 부모로부터 보안 정책을 상속하는 경우 항목을 이동하면 대상 폴더의 보안 정책이 상속됩니다. 항목이 부모로부터 보안 정책을 상속하지 않는 경우 항목을 이동해도 보안 정책이 변경되지 않습니다.

대상 경로가 지정된 항목 rsInvalidDestination 과 동일한 SharePoint 사이트에 있지 않으면 오류가 반환됩니다.

SharePoint 라이브러리에서 항목을 이동하거나 이름을 변경하면 항목의 및 속성과 ModifiedDate 항목의 원본 및 대상 폴더가 수정 ModifiedBy 됩니다.

적용 대상