Skip to main content

Consuming WebServices in SQL Server 2005

No replies
Joined: 2003-06-09

Sql Server 2005 offers the functionality of writing functions, stored procedures, aggregates, triggers and types in .NET. In this way, we can 'wrap' .NET functionality in a database function, procedure or type. In an earlier article, we demonstrated this principle by wrapping regular expression functionality in a CLR function. In this article, we illustrate the same principle, but this time by consuming a web service. We will build a function in the AdventureWorks demo database, which converts an amount in Euros to an amount in US Dollars, fetching the conversion ratio from a web service. For this, we will use the webservice hosted at We want to point out that we at U2U did not create nor maintain this webservice, and as such cannot guarantee the availability nor the correctness of this service; it is just used for illustration purpose.