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
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