ReportingService2010.FireEvent(String, String, String) Método

Definición

Genera un evento basado en los parámetros proporcionados.

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)

Parámetros

EventType
String

Nombre del evento.

EventData
String

Los datos asociados al evento.

SiteUrl
String

La URL totalmente cualificada para el sitio de SharePoint.

Especifica null (Nothing en Visual Basic) al invocar este método en modo nativo.

Atributos

Ejemplos

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  

Comentarios

La siguiente tabla muestra la información sobre cabeceras y permisos sobre esta operación.

Uso de la cabecera SOAP (En) TrustedUserHeaderValue

(Fuera) ServerInfoHeaderValue
Permisos requeridos en modo nativo GenerateEvents (sistema)
Permisos requeridos en el modo SharePoint <xref:Microsoft.SharePoint.SPBasePermissions.ManageWeb>

Este método genera una rsUnsupportedParameterForModeException excepción si se especifica un valor no nulo para el SiteUrl parámetro en modo nativo.

El EventType parámetro se compara con el conjunto conocido de eventos definidos en el archivo de configuración del servidor de informes (rsreportserver.config). Si el evento no está en el archivo de configuración del servidor de informes, se lanza una excepción SOAP con un código de error de rsUnknownEventType. Este método soporta los TimedSubscription tipos de eventos y RefreshCache .

Si EventType es TimedSubscription, especifica el ID de suscripción en EventData, que se devuelve por CreateSubscription o CreateDataDrivenSubscription o CreateDataDrivenSubscription. Si EventType es RefreshCache, especifica el ID del plan de refresco de caché en EventData, que se devuelve por CreateCacheRefreshPlan.

El FireEvent método no verifica ni valida los datos proporcionados en el EventData parámetro. Cualquier valor de cadena es válido, incluyendo una cadena vacía.

Se aplica a