ReportingService2010.FireEvent(String, String, String) 메서드

정의

제공된 매개 변수를 기준으로 이벤트를 발생시킵니다.

public:
 void FireEvent(System::String ^ EventType, System::String ^ EventData, System::String ^ SiteUrl);
[System.Web.Services.Protocols.SoapDocumentMethod("http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/FireEvent", ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped, RequestNamespace="http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer", ResponseNamespace="http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer", Use=System.Web.Services.Description.SoapBindingUse.Literal)]
[System.Web.Services.Protocols.SoapHeader("ServerInfoHeaderValue", Direction=System.Web.Services.Protocols.SoapHeaderDirection.Out)]
[System.Web.Services.Protocols.SoapHeader("TrustedUserHeaderValue")]
public void FireEvent (string EventType, string EventData, string SiteUrl);
[<System.Web.Services.Protocols.SoapDocumentMethod("http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/FireEvent", ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped, RequestNamespace="http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer", ResponseNamespace="http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer", Use=System.Web.Services.Description.SoapBindingUse.Literal)>]
[<System.Web.Services.Protocols.SoapHeader("ServerInfoHeaderValue", Direction=System.Web.Services.Protocols.SoapHeaderDirection.Out)>]
[<System.Web.Services.Protocols.SoapHeader("TrustedUserHeaderValue")>]
member this.FireEvent : string * string * string -> unit
Public Sub FireEvent (EventType As String, EventData As String, SiteUrl As String)

매개 변수

EventType
String

이벤트의 이름입니다.

EventData
String

이벤트와 연결된 데이터입니다.

SiteUrl
String

SharePoint 사이트에 대한 정규화된 URL입니다.

기본 모드에서 이 메서드를 호출할 때 null(Visual Basic의 경우 Nothing)로 지정합니다.

특성

예제

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)  
    {  
        ReportingService2010 rs = new ReportingService2010();  
        rs.Url = "http://<Server Name>" +  
            "/_vti_bin/ReportServer/ReportService2010.asmx";  
        rs.Credentials =   
            System.Net.CredentialCache.DefaultCredentials;  

        string site = "http://<Server Name>";  

        // Get the subscriptions  
        Subscription[] subs =   
            rs.ListMySubscriptions(site);  

        try  
        {  
            if (subs != null)  
            {  
                // Fire the first subscription in the list  
                rs.FireEvent("TimedSubscription",   
                    subs[0].SubscriptionID, site);  
                Console.WriteLine("Event fired.");  
            }  
        }  
        catch (Exception ex)  
        {  
            Console.WriteLine(ex.Message);  
        }  
    }  
}  
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 ReportingService2010()  
        rs.Url = "http://<Server Name>" + _  
            "/_vti_bin/ReportServer/ReportService2010.asmx"  
        rs.Credentials = _  
            System.Net.CredentialCache.DefaultCredentials  

        Dim site As String = "http://<Server Name>"  

        ' Get the subscriptions  
        Dim subs As Subscription() = _  
            rs.ListSubscriptions(site)  

        Try  
            If Not (subs Is Nothing) Then  
                ' Fire the first subscription in the list  
                rs.FireEvent("TimedSubscription", subs(0).SubscriptionID, site)  
                Console.WriteLine("Event fired.")  
            End If  
        Catch ex As Exception  
            Console.WriteLine(ex.Message)  
        End Try  

    End Sub  

End Class  

설명

다음 표에서는 이 작업에 대한 헤더 및 사용 권한 정보를 보여 줍니다.

SOAP 헤더 사용 (In) TrustedUserHeaderValue

(Out) ServerInfoHeaderValue
기본 모드 필수 권한 GenerateEvents (시스템)
SharePoint 모드 필수 권한 <xref:Microsoft.SharePoint.SPBasePermissions.ManageWeb>

이 메서드는 기본 모드에서 rsUnsupportedParameterForModeException 매개 변수에 대해 null이 아닌 값이 지정된 경우 예외를 SiteUrl throw합니다.

EventType 매개 변수는 보고서 서버 구성 파일(rsreportserver.config)에 정의된 알려진 이벤트 집합과 일치합니다. 이벤트가 보고서 서버 구성 파일에 없는 경우 오류 코드 rsUnknownEventType가 인 SOAP 예외가 throw됩니다. 이 메서드는 및 RefreshCache 이벤트 형식을 TimedSubscription 지원합니다.

이 이TimedSubscriptionEventType 또는 CreateDataDrivenSubscriptionCreateDataDrivenSubscription 에서 반환 CreateSubscription 되는 의 EventData구독 ID를 지정합니다. 이 이RefreshCacheEventType 에서 캐시 새로 고침 계획 ID를 지정합니다. 이 ID는 에서 EventData반환CreateCacheRefreshPlan됩니다.

메서드는 FireEvent 매개 변수에 제공된 데이터를 확인하거나 유효성을 EventData 검사하지 않습니다. 빈 문자열을 포함하여 모든 문자열 값이 유효합니다.

적용 대상