次の方法で共有


ListChildren メソッド

指定したフォルダーの子の一覧を取得します。

名前空間:  ReportService2006
アセンブリ:  ReportService2006 (ReportService2006.dll)

構文

'宣言
<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices/ListChildren", RequestNamespace := "https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices",  _
    ResponseNamespace := "https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices",  _
    Use := SoapBindingUse.Literal, ParameterStyle := SoapParameterStyle.Wrapped)> _
<SoapHeaderAttribute("TrustedUserHeaderValue")> _
<SoapHeaderAttribute("ServerInfoHeaderValue", Direction := SoapHeaderDirection.Out)> _
Public Function ListChildren ( _
    Item As String _
) As CatalogItem()
'使用
Dim instance As ReportingService2006
Dim Item As String
Dim returnValue As CatalogItem()

returnValue = instance.ListChildren(Item)
[SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices/ListChildren", RequestNamespace = "https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices", 
    ResponseNamespace = "https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices", 
    Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]
[SoapHeaderAttribute("TrustedUserHeaderValue")]
[SoapHeaderAttribute("ServerInfoHeaderValue", Direction = SoapHeaderDirection.Out)]
public CatalogItem[] ListChildren(
    string Item
)
[SoapDocumentMethodAttribute(L"https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices/ListChildren", RequestNamespace = L"https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices", 
    ResponseNamespace = L"https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices", 
    Use = SoapBindingUse::Literal, ParameterStyle = SoapParameterStyle::Wrapped)]
[SoapHeaderAttribute(L"TrustedUserHeaderValue")]
[SoapHeaderAttribute(L"ServerInfoHeaderValue", Direction = SoapHeaderDirection::Out)]
public:
array<CatalogItem^>^ ListChildren(
    String^ Item
)
[<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices/ListChildren", RequestNamespace = "https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices", 
    ResponseNamespace = "https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices", 
    Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)>]
[<SoapHeaderAttribute("TrustedUserHeaderValue")>]
[<SoapHeaderAttribute("ServerInfoHeaderValue", Direction = SoapHeaderDirection.Out)>]
member ListChildren : 
        Item:string -> CatalogItem[] 
public function ListChildren(
    Item : String
) : CatalogItem[]

パラメーター

戻り値

型: array<ReportService2006. . :: . .CatalogItem> [] () [] []
CatalogItem オブジェクトの配列です。子が存在しない場合、このメソッドは空の CatalogItem 配列を返します。

説明

次の表に、この操作に関連するヘッダーおよび権限の情報を示します。

SOAP ヘッダー

(In) TrustedUserHeaderValue

(Out) ServerInfoHeaderValue

必要な権限

ViewListItems()()()()

このメソッドは、ユーザーが ViewListItems()()()() 権限を持っている Item のすべての子を返します。

カタログ ルート ("/") で ListChildren を呼び出すと、最上位レベルのサイトの一覧が返されます。

使用例

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