Partilhar via


Calling Web Service Methods

When you use a Microsoft .NET Framework proxy class to call Web service operations, you do so by using the methods of that class. These methods respond like any other method of a class in the .NET Framework class library. All Web service methods have public access and require you to supply the appropriate number of arguments and argument types. After you have created an instance of the proxy class in your project, you can call the methods to perform reporting operations via the report server. The following C# code illustrates the use of the ListChildren method of the ReportingService2005 proxy class. The code is used to make a recursive call to the Web service that returns an array of CatalogItem objects that contains a list of all items in the report server database:

Dim rs As New ReportingService2005()
rs.Credentials = System.Net.CredentialCache.DefaultCredentials
Dim items As CatalogItem() = rs.ListChildren("/", True)
ReportingService rs = new ReportingService2005();
rs.Credentials = System.Net.CredentialCache.DefaultCredentials;
CatalogItem[] items = rs.ListChildren("/", true);

See Also

Reference

Reporting Services Web Services Class Library

Concepts

Introducing the Report Server Web Service

Other Resources

Building Applications Using the Web Service and the .NET Framework

Help and Information

Getting SQL Server 2005 Assistance