0

enter image description here

EXEC @hResult = sp_OAMethod @objectID, 'send', null, @requestBody 
 IF @hResult <> 0 
 BEGIN
 EXEC sp_OAGetErrorInfo @objectID, @source OUT, @desc OUT
 SELECT hResult = convert(varbinary(4), @hResult), 
 source = @source, 
 description = @desc, 
 FailPoint = 'Send failed', 
 MedthodName = @methodName 
 goto destroy 

When I Call a web service Through Sp IN SQl Server In Above Mention I'm getting error as Shown In The Pics

Paul White
95.4k30 gold badges440 silver badges689 bronze badges
asked Oct 6, 2016 at 11:51
4
  • Well it looks like you can't connect to the server right? are you sure it works when you call it from outside sql server (like using soapui)? Commented Oct 6, 2016 at 14:22
  • @TomV Yes you are Right Suppose in Case If My Server service is not Started how can I send request from Sql with out such error Commented Oct 7, 2016 at 5:06
  • 1
    If your server isn't running I don't understand how you could send a request to it without error Commented Oct 7, 2016 at 8:24
  • OK Is Their Any Alternative How Can I Save The Data Whose Sending is getting Fail Commented Oct 7, 2016 at 8:36

1 Answer 1

1

Not sure about that exact error, but I would advise against using the OLE Automation stored procedures (i.e. sp_OA*) as they have been deprecated since SQL Server 2005 was released and have various "issues".

I you need to interact with a Web Service, your best bet is to use SQLCLR. I have more info regarding this option in the following answer, also here on DBA.SE:

Bringing web service data into SQL server

answered Oct 6, 2016 at 16:31

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.