1. Declare the variables as out parameters to the SP
2. When calling stored procedure, declare a variable for each of the out parameters and pass them to the stored procedure:
CREATE PROC [dbo].[UPLOAD]
@WarrantyCode AS NVARCHAR(20),
@Serial AS NVARCHAR(50) ,
@ProductTitle AS NVARCHAR(50) ,
@ShopCenter AS NVARCHAR(70) ,
@AddDate DATE ,
@Bill AS NVARCHAR(50) ,
@Response as Varchar(8000) output
AS
DECLARE @url as nvarchar(256)
Declare @Obj as Int;
DECLARE @hr AS INT
DECLARE @src AS VARCHAR(MAX)
DECLARE @desc AS VARCHAR(MAX)
SET @url = 'http://MY IP:9671/MyWebService.asmx/Upload?WarrantyCode=' + @WarrantyCode + '&Serial=' + @Serial + '&ProductTitle=' + @ProductTitle + '&ShopCenter=' + @ShopCenter + '&AddDate=' + CAST(@AddDate AS NVARCHAR(20)) + '&Bill=' + @Bill
Exec @hr=sp_OACreate 'MSXML2.XMLHTTP', @Obj OUT
EXEC sp_OACreate 'MSXML2.ServerXMLHttp.3.0', @obj OUT
EXEC sp_OAMethod @obj, 'open', NULL, 'POST', @url, false
EXEC sp_OAMethod @obj, 'send'
EXEC sp_OAGetProperty @obj, 'ResponseText', @Response OUTPUT
SELECT @url AS URL, @Response AS [response], CHARINDEX('amiressami.com', @Response) AS IsOK, CHARINDEX('Roozbeh', @Response) AS Result
EXEC sp_OADestroy @obj
RETURN
Call like this:
declare @response varchar(8000)
exec dbo.UPLOAD .........., @response output
Now, your response variable will contain the value assigned to it in the SP. I only changed @response, you need to do the others as well.
Looking at your SP, that's actually exactly the same thing you are already doing when calling sp_OAGetProperty, so reading your own SP you could have already found out the answer yourself.