declare @objRef int
declare @resultcode int
declare @responseText varchar(8000)
EXEC @resultcode = sp_OACreate 'MSXML2.ServerXMLHTTP', @objRef OUT,4
EXEC @resultcode = sp_OAMethod @objRef, 'Open', NULL,'GET','http://localhost:16808/OracleDataInsert.asmx?op=data', false
EXEC @resultcode = sp_OAMethod @objRef, 'Send',null
EXEC @resultcode = sp_OAGetProperty @objRef, 'responseText',@responseText output
EXEC sp_OADestroy @objRef
i got this code from surfed in web site. but it is not working.
How to call webservice from stored Procedure.
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Harieswaran DRank #1,389 · 1.2K reputationPosted Dec 29, 2014, 5:04 AM EST
Saravana KumarRank #4,788 · 325 reputationPosted Dec 29, 2014, 6:31 AM EST