ReportingService2006.ListChildren(String) 메서드

정의

지정된 폴더에서 자식 목록을 가져옵니다.

public:
 cli::array <ReportService2006::CatalogItem ^> ^ ListChildren(System::String ^ Item);
public ReportService2006.CatalogItem[] ListChildren (string Item);
member this.ListChildren : string -> ReportService2006.CatalogItem[]
Public Function ListChildren (Item As String) As CatalogItem()

매개 변수

Item
String

폴더에 대한 정규화된 URL입니다.

반환

CatalogItem 개체의 배열입니다. 자식이 없으면 이 메서드는 비어 있는 CatalogItem 배열을 반환합니다.

예제

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;  

        CatalogItem[] items = null;  

        try  
        {  
            items = rs.ListChildren("/");  

            foreach (CatalogItem item in items)  
            {  
                Console.WriteLine("Name: " + item.Name);  
                Console.WriteLine("Path: " + item.Path);  
                Console.WriteLine("Type: " + item.Type.ToString());  
            }  
        }  

        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 items As CatalogItem() = Nothing  

        ' Retrieve a list of all items   
        ' from the report server database.   
        Try  
            items = rs.ListChildren("/")  

            If Not (items Is Nothing) Then  
                For Each item As CatalogItem In items  
                    Console.WriteLine("Name: " + item.Name)  
                    Console.WriteLine("Path: " + item.Path)  
                    Console.WriteLine("Type: " + _  
                        item.Type.ToString())  
                Next  
            End If  

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

    End Sub  

End Class  

설명

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

SOAP 헤더 (In) TrustedUserHeaderValue

(Out) ServerInfoHeaderValue
필요한 권한 <xref:Microsoft.SharePoint.SPBasePermissions.ViewListItems>

이 메서드는 사용자에게 <xref:Microsoft.SharePoint.SPBasePermissions.ViewListItems> 권한이 있는 의 Item 모든 자식을 반환합니다.

카탈로그 루트 "/"에서 를 호출 ListChildren 하면 최상위 사이트 목록이 반환됩니다.

적용 대상