08
01/13
在存储过程中调用WebService
1 create procedure usp_CallWebServices 2 ( 3 @parameter nvarchar(500)=null 4 ) 5 as 6 Declare @obj int 7 Declare @SvercieUrl nvarchar(200) 8 Declare @response nvarchar(max) 9 10 11 Set @SvercieUrl = 'http://locahost/webservices/service.asmx/saludar?param='+@parameter 12 13 14 Execute sp_OACreate 'MSXML2.ServerXMLHttp',@obj out 15 Execute sp_OAMethod @obj,'open',null,'Get',@SvercieUrl,false 16 Execute sp_OAMethod @obj,'...