Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Issue in Web services with QTP.
#1
Not Solved
Hi,
I am using QTP11.Windows7.
For web services Testing i have installed web services add in qtp, installed .NET2.0WSE3.0.
I am using WS-I validation tool platform - .NET .created input XML file.
I have created web sevices through web services wizard.i have validate the WSDl . it is perfect.
My code is ......

Code:
Dim ssr0XML,XMLstr
Set ssr0XML = XMLUtil.CreateXMLFromFile("D:\QTP_RAZOO\CityWeathe r.xml")
XMLstr=ssr0XML.ToString
msgbox XMLstr
wait(5)
WebService("WeatherService").SendRequest GetCityWeatherByZIP, XMLstr

in the last line qtp is throwing the following error.

"The GetCityWeatherByZIP operation call failed.
The .NET Framework 2.0 WSE 3.0 toolkit returned the following error:
Exception from: System.Web.Services
The request failed with HTTP status 417: Expectation failed.

Line (3):
Code:
"Set GetCityWeatherByZIP = WebService("WeatherService").GetCityWeatherByZIP(" string (Autogenerated)")". "

But without using addin qtp is working fine. qtp is able to send the request and receives the request.

I tried in different ways. but i couldnot resolve this issue.
If any one knows the solution kindly provide the solution.

Thanks in advance.
Reply
#2
Not Solved
see if this helps
https://www.learnqtp.com/category/web-services/

Reply
#3
Not Solved
Thanks for you reply.
already i have read the article and tried with that. without addin it is working fine. But by using addin it is throws the above mentioned error.

pls share your ideas.

Thanks in advance.
Reply
#4
Not Solved
if you are using webservice object, use the method directly like WebService("WeatherService").GetCityWeatherByZIP rather WebService("WeatherService").SendRequest

Reply
#5
Not Solved
Thanks for your quick response.
As per your suggestion, I tried to execute the script . But qtp is throwing the following error..

"The GetCityWeatherByZIP operation call failed.
The .NET Framework 2.0 WSE 3.0 toolkit returned the following error:
Parameter count mismatch.

Exception from: mscorlib
Parameter count mismatch.

Line (13): "WebService("WeatherService").GetCityWeatherByZIP, XMLstr". "

I have a doubt here..

Is it necessary to use the XMLwarehouse when using the webservices testing wizard
I did not add any input data in XMl structure...Because of that is it throw an error..

Any other ideas...

Thanks.
Reply
#6
Not Solved
Yes, you are right. You should use XMLWarehouse and enter the input data there.

Reply
#7
Not Solved
Thanks for your reply.But i am using extenal file(xml file) for input data.is it necessary to enter the input data when we use external file (xml file)for input data.
kindly clarify my doubt and if it is necessary, how to enter the input data.

Note: I tried with that but XMLWarehouse is not getting displayed in my script.
I tried ....> File -->settings-->XMLWareHouse . Here i have uploaded the the xml file. another one is Ihave created input dtata manually here.

for above mentioned both i tried but i am getting the same error message "Object not set to an instance of object"
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Testing Web Services sohalshah 10 8,232 04-17-2014, 01:29 AM
Last Post: Tp123
  Query on Web services:web services using QTP VVKumar 0 1,642 10-03-2013, 10:42 AM
Last Post: VVKumar
  Web Services Testing using QTP VVKumar 0 1,858 10-01-2013, 01:13 PM
Last Post: VVKumar
  Working with Web Services iagarab 0 1,748 01-08-2010, 05:53 PM
Last Post: iagarab
  Does anyone use QTP to test Web Services? lbc_rider 4 8,582 06-02-2009, 01:13 AM
Last Post: RaghunadhKiran

Forum Jump:


Users browsing this thread: 2 Guest(s)