Udostępnij za pośrednictwem


The Role of SOAP in Reporting Services

The Report Server 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 Report Server 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 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 Report Server 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="https://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="https://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 element, 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 Microsoft .NET Framework client proxy class that encapsulates all SOAP operations into methods. The following Microsoft Visual 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="https://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="https://www.microsoft.com/sql/ReportingServer" />
    </soap:Body>
</soap:Envelope>

The DeleteItem method has no return value, so an empty response is returned.

See Also

Concepts

Accessing the SOAP API

Other Resources

Report Manager
Report Server
Report Server Web Service

Help and Information

Getting SQL Server 2005 Assistance