REST Web Service as a Data Source
Hello Everyone,
I am trying to extract data from a REST web service using SSIS 2008 R2. How can I use a RESTful web service as a data source in SSIS? Also, how can I set the query string parameter "period" to use a SSIS variable so I can create a dynamic
URL?
Here is a sample of the web service URL:
xml Format:
https://ws.webtrends.com/v2/ReportService/profiles/Xtvuxs50IO9/reports/19d039ae7460/?period=2011w3&format=xml
csv Format:
https://ws.webtrends.com/v2/ReportService/profiles/Xtvuxs50IO9/reports/19d039ae7460/?period=2011w3&format=csv
Any help would be appreciated, thank you.
March 7th, 2011 7:04pm
Youshould be able to execute the
WebService task to consume the records returned in form of an object type of the package variable (ADO in essence).
To create the dynamic URL you can use a Script Task to form the desired URL string in it and consume the variable in the WebService task.
Arthur My Blog
Free Windows Admin Tool Kit Click here and download it now
March 7th, 2011 7:50pm
The WebService task seems to require a WSDL file in order to work, which RESTful web services don't have. Is there a way to work around this?
April 19th, 2011 12:37pm
The WebService task seems to require a WSDL file in order to work, which RESTful web services don't have. Is there a way to work around this?
Hi Brandon,
You can create script task to retrieve information from REST (which is essentially HTTP download). Check this
script for reference.SSIS Tasks Components Scripts Services | http://www.cozyroc.com/
Free Windows Admin Tool Kit Click here and download it now
April 21st, 2011 9:16am
As a workaround, I decided to set the Connection String of the Connection Manager on the fly.
Dim startDate As Date = DateAdd(DateInterval.Day, -1, Now)
Dim endDate As Date = Now
Dts.Connections("HTTP Connection Manager").ConnectionString = "https://www.test.com/test.xml?start_date=" + startDate + "&endDate =" + endDate
May 4th, 2011 5:11pm