Access a value from the results of web_service_ca
Printed From: One Stop Testing
Category: Testing Tools @ OneStopTesting
Forum Name: LoadRunner @ OneStopTesting
Forum Discription: LoadRunner is a performance and load testing product by HP / Mercury Interactive for examining system behavior and performance, while generating actual load.
URL: http://forum.onestoptesting.com/forum_posts.asp?TID=401
Printed Date: 16Dec2024 at 3:54am
Topic: Access a value from the results of web_service_ca
Posted By: jay@jay
Subject: Access a value from the results of web_service_ca
Date Posted: 31Mar2007 at 2:25am
1. What version of LoadRunner (LR) or PerformanceCenter (PC) are you using? - 8.1 2. What is the protocol you are recording? - Web Services 3. Which LoadRunner/PerformanceCenter feature or service packs are you using? - VuGen 4.
What kind of LoadRunner license do you have - Subscription, Perpetual,
Virtual User days, or Evaluation? (choose the one that fits your
license model) - Perpetual 5. What platform(s) and Operating Systems? Include version and service packs. Win XP SP2 6. If you have filed a service request with Mercury, what have they told you at this point with respect to your issue?
Hi, Everybody!
I'm testing a web service. Values
from the results of the web_service_call function with a Web Services
Vuser are saved in a parameter between BEGIN_RESULT and END_RESULT with
the format:
ResultName=ParamName
But I can't use this value forward, because I can't access it. How can I do that ? Thank you!
|
Replies:
Posted By: pranati01
Date Posted: 31Mar2007 at 2:45am
Hi,
Here is the code:
int UID = web_service_call("StepName=getNextID_103", "SOAPMethod=UniqueIDServiceService.UniqueIDService.getNextID", "ResponseParam=response", "WSDL=C:/../UniqueIDService.wsdl", "UseWSDLCopy=1", "Snapshot=t1174497367.inf", BEGIN_ARGUMENTS, END_ARGUMENTS, BEGIN_RESULT, "getNextIDReturn = Param_getNextIDReturn", END_RESULT, LAST);
lr_think_time(3);
lr_message("The value of getNextId is %d", UID );
return 0;
But the result is always 0. And I see the result in the Extended log: vuser_init.c(7): Notify: Saving Parameter "response = <?xml ...> vuser_init.c(7): Notify: Saving Parameter "Param_getNextIDReturn = 123"
I just want to retrieve the value of getNextIDReturn (is int) and assign it to a variable that can use afterwards.
|
|