다음을 통해 공유


ReportingService2005.GetProperties Method

Returns the value of one or more properties of an item in the report server database.

네임스페이스: Microsoft.WSSUX.ReportingServicesWebService.RSManagementService2005
어셈블리: ReportService2005 (in reportingservice2005.dll)

구문

‘선언
<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/GetProperties", RequestNamespace:="https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices", ResponseNamespace:="https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices", Use:=SoapBindingUse.Literal, ParameterStyle:=SoapParameterStyle.Wrapped)> _
<SoapHeaderAttribute("ServerInfoHeaderValue", Direction:=SoapHeaderDirection.Out)> _
<SoapHeaderAttribute("ItemNamespaceHeaderValue")> _
Public Function GetProperties ( _
    Item As String, _
    Properties As Property() _
) As Property()
[SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/GetProperties", RequestNamespace="https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices", ResponseNamespace="https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices", Use=SoapBindingUse.Literal, ParameterStyle=SoapParameterStyle.Wrapped)] 
[SoapHeaderAttribute("ServerInfoHeaderValue", Direction=SoapHeaderDirection.Out)] 
[SoapHeaderAttribute("ItemNamespaceHeaderValue")] 
public Property[] GetProperties (
    string Item,
    Property[] Properties
)
[SoapDocumentMethodAttribute(L"https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/GetProperties", RequestNamespace=L"https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices", ResponseNamespace=L"https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices", Use=SoapBindingUse::Literal, ParameterStyle=SoapParameterStyle::Wrapped)] 
[SoapHeaderAttribute(L"ServerInfoHeaderValue", Direction=SoapHeaderDirection::Out)] 
[SoapHeaderAttribute(L"ItemNamespaceHeaderValue")] 
public:
array<Property^>^ GetProperties (
    String^ Item, 
    array<Property^>^ Properties
)
/** @attribute SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/GetProperties", RequestNamespace="https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices", ResponseNamespace="https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices", Use=SoapBindingUse.Literal, ParameterStyle=SoapParameterStyle.Wrapped) */ 
/** @attribute SoapHeaderAttribute("ServerInfoHeaderValue", Direction=SoapHeaderDirection.Out) */ 
/** @attribute SoapHeaderAttribute("ItemNamespaceHeaderValue") */ 
public Property[] GetProperties (
    String Item, 
    Property[] Properties
)
SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/GetProperties", RequestNamespace="https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices", ResponseNamespace="https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices", Use=SoapBindingUse.Literal, ParameterStyle=SoapParameterStyle.Wrapped) 
SoapHeaderAttribute("ServerInfoHeaderValue", Direction=SoapHeaderDirection.Out) 
SoapHeaderAttribute("ItemNamespaceHeaderValue") 
public function GetProperties (
    Item : String, 
    Properties : Property[]
) : Property[]

매개 변수

  • Item
    The full path name or the ID of the item.
  • Properties
    An array of Property objects that contains the properties for which you want to retrieve values.

반환 값

An array of Property objects that represents the properties of the specified item.

주의

The default value that must be passed for this argument is the full path name. To supply an ID, you must set the ItemNamespaceHeader SOAP header. For more information, see Setting the Item Namespace for the GetProperties Method.

Use the GetProperties method to retrieve the complete set of user-defined and reserved properties. To retrieve the standard subset of reserved properties, use the ListChildren method. For a list of the reserved properties of items in the report server database, see Report Server Item Properties.

If the Properties parameter is null (Nothing in Visual Basic), all properties for the specified item are returned. These include all user-defined and built-in properties that are specific to the item.

You can pass the full path name of the item for the Item parameter or you can pass the ID of the item. For more information about using SOAP headers to accomplish this, see Using Reporting Services SOAP Headers.

To compile this code example, you must reference the Reporting Services WSDL and import certain namespaces. For more information, see 코드 예제 컴파일 및 실행. The following code example uses the GetProperties method to retrieve the description associated with the Company Sales report:

Imports System
Imports System.Web.Services.Protocols

Class Sample
   Public Shared Sub Main()
      Dim rs As New ReportingService2005()
      rs.Credentials = System.Net.CredentialCache.DefaultCredentials

      ' Create the property to retrieve.
      Dim retrieveProp As New [Property]()
      retrieveProp.Name = "Description"
      Dim props(0) As [Property]
      props(0) = retrieveProp

      Try
         Dim properties As [Property]() = rs.GetProperties("/SampleReports/Company Sales", props)

         Dim prop As [Property]
         For Each prop In  properties
            ' Writes the description to the console.
            Console.WriteLine(prop.Value)
         Next prop

      Catch e As SoapException
         Console.WriteLine(e.Detail.InnerXml.ToString())
      End Try
   End Sub 'Main
End Class 'Sample
using System;
using System.Web.Services.Protocols;

class Sample
{
   public static void Main()
   {
      ReportingService2005 rs = new ReportingService2005();
      rs.Credentials = System.Net.CredentialCache.DefaultCredentials;

      // Create the property to retrieve.
      Property retrieveProp = new Property();
      retrieveProp.Name = "Description";
      Property[] props = new Property[1];
      props[0] = retrieveProp;

      try
      {
         Property[] properties = rs.GetProperties("/SampleReports/Company Sales", props);

         foreach (Property prop in properties)
         {
            // Writes the description to the console.
            Console.WriteLine(prop.Value);
         }
      }

      catch ( SoapException e )
      {
         Console.WriteLine( e.Detail.InnerXml.ToString() );
      }
   }
}

스레드 보안

Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

플랫폼

개발 플랫폼

지원되는 플랫폼 목록은 SQL Server 2005 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.

대상 플랫폼

지원되는 플랫폼 목록은 SQL Server 2005 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.

참고 항목

참조

ReportingService2005 Class
ReportingService2005 Members
Microsoft.WSSUX.ReportingServicesWebService.RSManagementService2005 Namespace