ReportExecutionService.ListSecureMethods 方法

定義

回傳一份需要安全(SSL)連線的 SOAP 方法清單。

public:
 cli::array <System::String ^> ^ ListSecureMethods();
public string[] ListSecureMethods();
member this.ListSecureMethods : unit -> string[]
Public Function ListSecureMethods () As String()

傳回

String[]

一組 String 代表方法名稱的物件陣列。 若沒有任何 SOAP 方法需要 SSL 連線,則會回傳一個空陣列。

範例

要編譯此程式碼範例,您必須參考 Reporting Services WSDL 並匯入特定命名空間。 欲了解更多資訊,請參閱編 譯與執行程式碼範例。 以下程式碼範例使用此 ListSecureMethods 方法來擷取目前需要安全連線的方法:

Imports System  

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

      ' Set the base Web service URL of the source server  
      rs.Url = "http://servername/reportserver/ReportExecution2005.asmx"  

      Dim methods As String() = rs.ListSecureMethods()  

      If Not (methods Is Nothing) Then  
         Dim method As String  
         For Each method In  methods  
            Console.WriteLine(method)  
         Next method  
      End If  
   End Sub 'Main  
End Class 'Sample  
using System;  

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

      // Set the base Web service URL of the source server  
      rs.Url = "http://servername/reportserver/ReportExecution2005.asmx";  

      string[] methods = rs.ListSecureMethods();  

      if (methods != null)  
      {  
         foreach (string method in methods)  
         {  
            Console.WriteLine(method);  
         }  
      }  
   }  
}  

備註

下表顯示此操作的標頭與權限資訊。

SOAP 標頭的使用 (在) TrustedUserHeaderValue

(出局) ServerInfoHeaderValue
原生模式所需權限 None
SharePoint 模式 必要權限 None

報告伺服器的 SecureConnectionLevel 設定決定了該 ListSecureMethods 方法回傳的 SOAP 方法清單。 欲了解更多資訊,請參閱 使用安全網路服務方法

適用於