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

  • 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)? – Tom V Oct 6 '16 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 – Alfaiz Ahmed Oct 7 '16 at 5:06
  • 1
    If your server isn't running I don't understand how you could send a request to it without error – Tom V Oct 7 '16 at 8:24
  • OK Is Their Any Alternative How Can I Save The Data Whose Sending is getting Fail – Alfaiz Ahmed Oct 7 '16 at 8:36
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

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.