Udostępnij przez


Za pomocą interfejsu API SOAP w aplikacji sieci Web

Można uzyskać dostęp do wszystkich funkcji serwer raportów API SOAP Reporting Services.Ponieważ usługa sieci Web, SOAP API są łatwo dostępne zapewniające funkcje raportowania organizacji do aplikacji biznesowych niestandardowych.Dostęp usługa sieci Web Serwer raportów z aplikacji sieci Web w bardzo w taki sam sposób, jak można uzyskać dostęp do API SOAP z Microsoft Aplikacja systemu Windows. Using the Microsoft .NET Framework, you can generate a proxy class that exposes the properties and methods of the Report Server Web service and enables you to use a familiar infrastructure and tools to build business applications on Reporting Services technology.

Reporting Services Funkcje zarządzania raportu jest równie łatwo dostępny z aplikacji sieci Web z aplikacji systemu Windows.Z aplikacji sieci Web można dodawać i usuwać elementy z baza danych serwer raportów zestaw element zabezpieczeń, modyfikować elementy baza danych serwer raportów, planowanie i dostawy oraz inne.

Włączanie personifikacji

Pierwszym krokiem w konfigurowaniu aplikacji sieci Web jest Włączanie personifikacji klient usługa sieci Web.With impersonation, ASP.NET applications can execute with the identity of the client on whose behalf they are operating.ASP.NET relies on Microsoft Internet Information Services (IIS) to authenticate the user and either pass an authenticated token to the ASP.NET application or, if unable to authenticate the user, pass an unauthenticated token.W obu przypadkach ASP.NET aplikacja personifikuje, niezależnie od tokenu jest odbierane, jeśli personifikacja jest włączona. Personifikacji klient, można włączyć, modyfikując plik Web.config aplikacji klient w następujący sposób:

<!-- Web.config file. -->
<identity impersonate="true"/>

Uwaga

Personifikacja jest domyślnie wyłączona.

For more information about ASP.NET impersonation, see the Microsoft .NET Framework SDK documentation.

Zarządzanie serwer raportów za pomocą interfejsu API SOAP

Aplikacji sieci Web można również użyć do zarządzania serwer raportów i jego zawartość.Menedżer raportów, dostępnych w programie Reporting Services, jest przykładem aplikacji sieci Web, która całkowicie został zbudowany przy użyciu ASP.NET oraz Reporting Services SOAP API. Funkcje zarządzania raport Menedżer raportów można dodawać do niestandardowych aplikacji sieci Web.For example, you might want to return a list of available reports in the report server database and display them in a ASP.NETListbox control for your users to choose from.Poniższy kod, który łączy się z baza danych serwer raportów i zwraca listę elementów w baza danych serwer raportów.Następnie dodaje się do formant pola listy, który wyświetla ścieżka każdego raportu dostępnych raportów.

Private Sub Page_Load(sender As Object, e As System.EventArgs)
   ' Create a Web service proxy object and set credentials
   Dim rs As New ReportingService2005()
   rs.Credentials = System.Net.CredentialCache.DefaultCredentials

   ' Return a list of catalog items in the report server database
   Dim items As CatalogItem() = rs.ListChildren("/", True)

   ' For each report, display the path of the report in a Listbox
   Dim ci As CatalogItem
   For Each ci In  items
      If ci.Type = ItemTypeEnum.Report Then
         catalogListBox.Items.Add(ci.Path)
      End If
   Next ci
End Sub ' Page_Load 
private void Page_Load(object sender, System.EventArgs e)
{
   // Create a Web service proxy object and set credentials
   ReportingService2005 rs = new ReportingService2005();
   rs.Credentials = System.Net.CredentialCache.DefaultCredentials;

   // Return a list of catalog items in the report server database
   CatalogItem[] items = rs.ListChildren("/", true);

   // For each report, display the path of the report in a Listbox
   foreach(CatalogItem ci in items)
   {
      if (ci.Type == ItemTypeEnum.Report)
         catalogListBox.Items.Add(ci.Path);
   }
}