Highlighted
Absent Member.
Absent Member.
510 views

Web_reg_save_param not working with flex_amf_calls

Hi,

i am using LR 9.52. I have recorded an flex application . i have a series of dynamic values generated. there is an id in perticular that i am trying to correlate. for this i using the web_reg_save_param with empty bounds so as to capture the entire response and substitute the cirrect boundaries for the id i am trying to capture. but when i ran the script i receeived error stating "No match found for the paramter "xyz". i have not specified any bounds for the web_reg_save_param. Also have provided max length for the parameter using the function web_set_max_param_length.Please let me know how can i capture the response of the flex_amf_call here.

Please note : In the transction i recorded i received a series of 5 flex amf calls and i placed web_reg_save_param above each of the call. but i encountered error only for the first amf call.

I am sure that the first amf call generates the dynamic value and hence it is important that i capture the response of the amf call.

Please advice. thanks.
0 Likes
5 Replies
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Please use lr_xml* functions to capture dynamic values in Amf/Flex scripts.

-Madhu
0 Likes
Highlighted
Absent Member.
Absent Member.

Madhu,
Thank you for your suggession.

i did check all the possible LR_XML functions. But all of them require an Input XML from which the dynamic value can be extracted. In my case server's response is where i need to fetch the dynamic values from...Please let me know how do i capture the server's response in an variable to be used as input for the lr_xml functions. Thanks.

Please note that i am using jar files(server and application) to get the flex_amf calls in the script while recording. Today i was able to fetch some response using the web_reg_save_param but it didnt seem to be the complete response.

Please advice.
0 Likes
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Yes, you need to pass the complete Response envelope received from the server and then you can extract it using lr_xml functions. In Flex functions, there is an argument ResponseParam, and once you use this argument the response gets saved automatically. This response param name you can use directly in lr_xml input.

Remember, it is not similar to the one you use with html correlation. In html, you pre-register the function with boundaries to capture the value which was sent by server and where as in lr_xml functions, we define it after the function call.

-Madhu
0 Likes
Highlighted
Absent Member.
Absent Member.

Hello Madhu,

Thank you for being a constant help to me on this. I looked at some examples for the lr_xml but didnt find any example where the input param for an xml function is built by capturing the response of an request. So in this regard i request you to please demostrate with an example .This would be a greate help. else please direct me to the possible area demonstrating this kind of info.thanks again.

Regards,

Aanchal
0 Likes
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Sorry, for the delayed response.

By default, you don't see any ResponseParam argument in any Flex_** calls. Go to tree View of the script > Right click on any step which you want to capture the response > Properties. In Properties dialog you can see an option "Response Parameter". Input parameter name in the text field, and flex_ step get populated with ResponseParam argument when you see in the script view. You may also directly edit the particular step in script view, but tree view avoids any syntax mistakes.

Then you can use that name in any lr_xml_** function to extract a particular value and use it further.

Hope it clarifies.

-Madhu
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.