SSIS – HOW TO CALL A WEB SERVICE BY USING THE WEB SERVICE TASK IN SSIS

In this post I am are going to discuss about how to configure Web Service task to call Currency Converter Web Service in SSIS and how to read the information from the web service Currency Converter. In this example we used the public web service from the below URL










Major components used in this Package
1.Web Service task
2. XML Task
3.Script Task

Web Service Task  :
Step 1 :  Open new project of integration services and rename the default package name as Web service

Step 2 :  Drag and drop the Web Service Task in Package and Create two variables (currency,CurrencyXML ) in package scope



Step 3:  Create new HTTP Connection by right click in connection manager and select HTTP connection















and enter the Server URL as

and test the test Connection





 








Step 4: open the one new Notepad and save it as Currency_Convertor.wsdl















Step 5: Double click on the Web service task and Configure the below















In General tab:

 Http Connection      -------> HTTP Connection Manager which is taken in Step 3.
WSDL file                  --------> Browse and select the Currency_Convertor.wsdl file
OverwriteWSDLFile    ---->  Set as True because we have taken the empty WSDL file and we need                                                  to download the WSL file and overwrite to empty WSDL file

Click on the Download WSDL then we will get the successfully downloaded popup.















Input tab :
In Input tab we have to configure
Service  -------------------->  CurrencyConvertor
Method ---------------------> ConversionRate        

And also we need to select the FromCurrency value and Tocurrency value .

 In this Example we have taken FromCurrency as USD(US Dollor) and Tocurrency(INR Indian Rupee)















Ouptut :
In output tab we have to configure the Output type .
Output types are two type
1. File Type
2.Variable

In this example we are taking Output variable as CurrencyXML 

2. Step to configure the XML Task
(Read the CoversionRate from the variable CurrencyXML )



Step 6 :
a. Double click on the XML Task and select the Operation Type as XPATH















b.  Configure like below screenshot
InPut Tab
SourceTpe--------------------> Variable
Source by  ------------------->variable CurrencyXML
Output Tab
SaveOperationResult   --->True
OperationResult
     DestinationType-------> variable
     Destination       -------->Currency
     OverwriteDestination ---->True
 Second Operand
     SencondOperand   ---->/bouble
  
XPath Options
    XPathOperation  ---->values
















3. Step to configure the Script Task to display value of Currency Rate

we can finally observe/validate  the value of currency conversion Rate in either watchlist or through script task
1. watch list :
  To watch the Variable values in the execution time we need to set the Breakpoints to the Task . In this example put the Post execute Break Point to the XML Task


















in watch1 enter the variable Name then it will show like below







Script Task :
Drag and drop the Script task and double click on it and select the Readonlyvariable as Curreny and  enter the below code in the main method 







author

Kiran Reddy A

Kiran has been a part of the IT industry for more than six years and Involved in many MSBI projects and product development with extensive usage of ETL and Reporting tools like SQL Server Integration Services (SSIS), SQL Server Analysis Services (SSAS), SQL Server Reporting Service (SSRS) and T-SQL

Get Free Email Updates to your Inbox!

www.CodeNirvana.in

Powered by Blogger.

Translate

Total Pageviews

Copyright © Journey to MSBI World With Kiran Reddy | Blogger Templates | Designed By Code Nirvana