The Role of SOAP in Reporting Services
The Reporting Services Web Service uses Simple Object Access Protocol (SOAP) messaging to send text-based commands over a network. These commands take the form of XML text that is sent over the World Wide Web using HTTP. By using SOAP as its communication protocol, the Reporting Services Web service allows applications and components to exchange data with the report server using an open and widely accepted infrastructure. The SOAP standard is defined at http://www.w3.org/TR/SOAP.
Any client application can act as a SOAP client as long as it is SOAP-aware and can send SOAP requests. Report Manager is one such SOAP client. It provides an interface to the report server database in which all reports and report-related content is stored. End users can use the application to browse through and manage reports and folders in the report server namespace. Report Manager is built on the Reporting Services Web service infrastructure.
A report server acts as a SOAP server, a SOAP-aware service that can accept requests from SOAP clients and create appropriate responses. The server handles the requests and sends encoded responses back to the client.
SOAP messages in Reporting Services take many different forms, depending on the type of request made by the client. The following example represents a simple SOAP client request to remove an item from the report server database:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <soap:Body> <DeleteItem xmlns="http://www.microsoft.com/sql/ReportingServer"> <item>/Samples/Report1</item> </DeleteItem> </soap:Body> </soap:Envelope>
The SOAP itself requires that messages be put into an envelope, with the bulk of the message inside a Body element. In this example, the body contains a call to the DeleteItem method, which takes a string parameter representing the path of the item to delete. You can create a .NET client proxy class that encapsulates all SOAP operations into methods. The following C# method represents the SOAP example given earlier:
public void DeleteItem(string item);
The response from the server might look like the following:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <soap:Body> <DeleteItemResponse xmlns="http://www.microsoft.com/sql/ReportingServer" /> </soap:Body> </soap:Envelope>
The DeleteItem method as part of a proxy class has no return value, so an empty response is returned.