(imported topic written by hmkjr91)
Hello,
Has anyone accessed WebReports data using SOAP via TSQL? I started with something like this, but not successful yet. Thanks! I’m using SQL Server 2008.
Declare @Object as Int;
Declare @ResponseText as Varchar(8000);
Exec sp_OACreate ‘MSXML2.XMLHTTP’, @Object OUT;
Exec sp_OAMethod @Object, ‘open’, NULL, ‘get’, ‘https://xxxxxxxxxx/webreports’, ‘false’
EXEC master…sp_OASetProperty @Object, ‘username’, ‘UserName’
EXEC master…sp_OASetProperty @Object, ‘password’, ‘Password’
EXEC master…sp_OASetProperty @Object, ‘relevanceExpr’, ‘(concatenation “,” of names of it, concatenation “,” of cpus of it, concatenation “,” of values of results (bes property “subnet address”, it)) of bes computers’
Exec sp_OAMethod @Object, ‘send’
Exec sp_OAMethod @Object, ‘responseText’, @ResponseText OUTPUT
Select @ResponseText AS Response
Exec sp_OADestroy @Object