ReportExecutionService.ListSecureMethods 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
返回需要安全(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方法列表。 更多信息请参见 使用安全Web服务方法。