Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calling A Web Service

Status
Not open for further replies.

gslick

Programmer
Sep 9, 2004
18
GB
Hi

does anybody have and links to any resources that shows me how to connect to a web service from within SQL Server 2005.

I am just looking for some code (even if its using c# clr) that can link to the web service and call a web method.

Thanks
 
You can look into using Broker

Or you can as you pointed out write a CLR procedure to do this. There may not be much out there for that type of setup though. I've never really checked on it but I have written CLR's to do this. You have to be very careful security wise of course sense your SQL Server will require external_access to make the calls. Broker was put in for just those types of tasks (and others). Some key things to remember with the CLR is the DB will need to be trustworthy along with external access granted to the owner of the assembly and the assembly of course will require a permission set of external access.



[sub]____________ signature below ______________
You may get help by means of code here. Just recall what happens to a rat when he eats the cheese off a rat trap while you're Ctrl+C/Ctrl+V'ing that code as your own[/sub]
 
Hi thanks for that.

I did look into using the Service Broker before i asked because I thought this was the logical choice, but it looks like you can only create a web service on a SQL box, but not call a webservice on an external box(unless I am mistaken)

You are correct, there isnt much info out there for this.

 
Here are a few articles you may want to look into


Check the end point discussion in the last article

[sub]____________ signature below ______________
You may get help by means of code here. Just recall what happens to a rat when he eats the cheese off a rat trap while you're Ctrl+C/Ctrl+V'ing that code as your own[/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top