Micro Focus QTP (UFT) Forums
New to webservices testing in QTP - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: New to webservices testing in QTP (/Thread-New-to-webservices-testing-in-QTP)



New to webservices testing in QTP - Shwetha - 02-08-2009

Hi,

I am new to webservices testing in QTP. I have basic understanding of how QTP works.

what i need is a sample script and explanation of how the script works. Just with one sample webservices script , how to send request and getting response.

I tried the webservices wizard and i tried the following url http://api.google.com/GoogleSearch.wsdl
got the following code.
Code:
' GoogleSearchService Web service object steps
doGetCachedPage = WebService("GoogleSearchService").doGetCachedPage("string (Autogenerated)","string (Autogenerated)")
WebService("GoogleSearchService").Check CheckPoint("doGetCachedPage")
Set doGoogleSearch = WebService("GoogleSearchService").doGoogleSearch("string (Autogenerated)","string (Autogenerated)",0,0,True,"string (Autogenerated)",True,"string (Autogenerated)","string (Autogenerated)","string (Autogenerated)")
WebService("GoogleSearchService").Check CheckPoint("doGoogleSearch")
doSpellingSuggestion = WebService("GoogleSearchService").doSpellingSuggestion("string (Autogenerated)","string (Autogenerated)")
WebService("GoogleSearchService").Check CheckPoint("doSpellingSuggestion")


When i try to run this script, qtp is returning an error as
The doGetCachedPage operation call failed.
The .NET Framework 2.0 WSE 3.0 toolkit returned the following error:
Soap error:
Message: Invalid key: string (Autogenerated)

Line (2):
Code:
"doGetCachedPage = WebService("GoogleSearchService").doGetCachedPage("string (Autogenerated)","string (Autogenerated)")".

Can someone help please.

Regards,
Shwetha