Share via


ReportingService2005.ServerInfoHeaderValue プロパティ

レポート サーバーのバージョンを表す、サーバー関連の情報です。

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

構文

'宣言
Public Property ServerInfoHeaderValue As ServerInfoHeader 
    Get 
    Set
'使用
Dim instance As ReportingService2005 
Dim value As ServerInfoHeader 

value = instance.ServerInfoHeaderValue

instance.ServerInfoHeaderValue = value
public ServerInfoHeader ServerInfoHeaderValue { get; set; }
public:
property ServerInfoHeader^ ServerInfoHeaderValue {
    ServerInfoHeader^ get ();
    void set (ServerInfoHeader^ value);
}
member ServerInfoHeaderValue : ServerInfoHeader with get, set
function get ServerInfoHeaderValue () : ServerInfoHeader 
function set ServerInfoHeaderValue (value : ServerInfoHeader)

プロパティ値

型: ReportService2005.ServerInfoHeader
レポート サーバーのバージョンを表す ServerInfoHeader オブジェクトです。

使用例

次のコード例をコンパイルするには、Reporting Services の WSDL を参照し、特定の名前空間をインポートする必要があります。 詳細については、「Compiling and Running Code Examples」を参照してください。 次のコード例では、Web サービスを呼び出した後、SOAP ヘッダーからサーバー情報を取得します。

Imports System

Class Sample
   Shared Sub Main()
      ' Create proxy object and set service credentials to integrated
      Dim rs As New ReportingService2005()
      rs.Credentials = System.Net.CredentialCache.DefaultCredentials

      Try
         ' Set the server info header 
         rs.ServerInfoHeaderValue = New ServerInfoHeader()

         ' Make a call to the Web service
         Dim items As CatalogItem() = rs.ListChildren("/", False)

         ' Output the server version and edition to the console
         Console.WriteLine("Server version: {0}", rs.ServerInfoHeaderValue.ReportServerVersionNumber)
         Console.WriteLine("Server edition: {0}", rs.ServerInfoHeaderValue.ReportServerEdition)

      Catch e As Exception
         Console.WriteLine(e.Message)
      End Try
   End Sub 'Main
End Class 'Sample
using System;

class Sample
{
   static void Main()
   {
      // Create proxy object and set service credentials to integrated
      ReportingService2005 rs = new ReportingService2005();
      rs.Credentials = System.Net.CredentialCache.DefaultCredentials;

      try
      {
         // Set the server info header 
         rs.ServerInfoHeaderValue = new ServerInfoHeader();

         // Make a call to the Web service
         CatalogItem[] items = rs.ListChildren("/", false);

         // Output the server version and edition to the console
         Console.WriteLine("Server version: {0}", 
            rs.ServerInfoHeaderValue.ReportServerVersionNumber);
         Console.WriteLine("Server edition: {0}", 
            rs.ServerInfoHeaderValue.ReportServerEdition);
      }

      catch (Exception e)
      {
         Console.WriteLine(e.Message);
      }
   }
}

関連項目

参照

ReportingService2005 クラス

ReportService2005 名前空間