Follow these steps to create an XML web service in SQL Server 2005:
Establish an HTTP endpoint on the SQL Server instance. An endpoint is an interface through which HTTP-based clients can query the server. You establish an endpoint by using the CREATE ENDPOINT T-SQL DDL statement.
Expose stored procedures or UDFs as web methods. You do this by defining existing stored procedures or UDFs for web access by using either the CREATE ENDPOINT or ALTER ENDPOINT T-SQL DDL statement.
Create the WSDL that describes the web service and make it available to clients, allowing them to access the web service. The WSDL can be generated by SQL Server or you can custom-build it.
The next section in this chapter gives an example of how to create a web service in SQL Server 2005.