Web services WSDL
What is the best practice to automate web services?
by giving the URL of WSDL
by specifying the file name (by loading the WSDL)
actually developers are keep on updating the methods?
and other thing is, we need to run these in production also..
so i am not able to decide which method is good for paratmeter?
If you have more than one webservices ,It is better to use write a function using httppost and use that function
for more information look into http://www.learnqtp.com/web-services...ervices-addin/
I use DP calls in QTP for Webservices, however if you have the WSDL you should be able to use the WebService wizard.
The first time I used the WS wizard I had to append "?WSDL" to the call to make it work, this was with QTP v9 so this issue may no-longer exist.
Web services WSDL
I already automated the script..it has around 20 methods, so i have 20 actions in my one script. each action contains one web service method.
i used web services wizard to automate the script..
now i have to run these scripts against production,,,,
so i have to update each and every method by providing the WSDL URL by manually, which i do not like//
so thinking of options..
i feel like if i provide WSDL file instead of URL, i can provide qa or production file , in the same location, just need to update the file name and then easily run with out lot of maintenance..
Here's how I do it:
I have an Environment variable to hold a key to the system you want to run against.
In the code I use a DP call to the webservice based on the above variable
Select Case Environment("ENV")
parm1 = "wsdl:=http://Systest:8080/MyWebservice/services/SYS-ExecutionService?WSDL"
parm1 = "wsdl:=http://UAT:8080/MyWebservice/services/SYS-ExecutionService?WSDL"
parm1 = "wsdl:=http://Prod:8080/MyWebservice/services/SYS-ExecutionService?WSDL"
data1 = "Select * from SYSDB.CustomerAccount"
executeSQLByDBName = WebService(parm1).SYS-ExecutionService(data1)