Report Management Web Service New in 2005 (ReportService2005.asmx)Previously in this chapter, you saw an example of the Report Execution web service ( ReportExecution2005.asmx ). Most of the report execution functionality is available using URL Access. In contrast, only a few URL Access methods (such as ListChildren() ) are available from the Report Management web service ( ReportService2005.asmx ). Thus, the Report Management web service is often used in combination with the Report Execution web service, and sometimes in combination with URL Access, to get the most comprehensive access to SSRS. To access the Report Management web service, you can follow the same steps used earlier to access the Report Execution web service:
The following is an example of a console application returning items stored on SSRS starting from the root " / " folder. static void Main(string[] args) { //creates new Web service (proxy) and set its credentials ReportingService2005 rs = new ReportingService2005(); rs.Credentials = System.Net.CredentialCache.DefaultCredentials; try { CatalogItem[] items = rs.ListChildren("/", true); Console.Write("Item Path, Item Name, Item Type, MimeType"); foreach (CatalogItem ci in items) { Console.Write(ci.Path + "," + ci.Name + "," + ci.Type + "," + ype + "\n"); } return; } catch (SoapException e) { Console.Write(e.Message); } } Valid items include DataSources , Folders , LinkedReports , Reports , Resources , and Unknown items. |