subrat_perf Absent Member.
Absent Member.
6976 views

how to pass xml FILE as input parameter

Jump to solution

I have to make a webservice call by inputing different XML files stored in local.Script is as below

 

web_service_call( "StepName=GetMapData_101",
"SOAPMethod=SoftDataWSClassService|SoftDataWSClass|GetMapData",
"ResponseParam=response",
"Service=SoftDataWSClassService",
"ExpectedResponse=SoapResult",
"Snapshot=t1363141064.inf",
BEGIN_ARGUMENTS,
"aXMLInput={file_here}", //I have to pass XML files here
"aTargetEnvironment=",
END_ARGUMENTS,
BEGIN_RESULT,
"GetMapDataReturn=output_here",
END_RESULT,
LAST);

 

Need help in finding approch to this kind of requirement.

Tags (1)
0 Likes
1 Solution

Accepted Solutions
Nathan Bramble Absent Member.
Absent Member.

Re: how to pass xml FILE as input parameter

Jump to solution

If what you are passing are a series of file locations (C:\file\myfile.xml) you can create a LR Parameter in the Parameter List with all the file locations in the parameter definition. Then replace your string [file_here] with {new_parameter_name}. Each time the script iterates the new file location/name will be used.

 

If you're passing a full XML string you can follow the same approach, just put the full XML string into each line of the parameter file.

 

0 Likes
3 Replies
Nathan Bramble Absent Member.
Absent Member.

Re: how to pass xml FILE as input parameter

Jump to solution

If what you are passing are a series of file locations (C:\file\myfile.xml) you can create a LR Parameter in the Parameter List with all the file locations in the parameter definition. Then replace your string [file_here] with {new_parameter_name}. Each time the script iterates the new file location/name will be used.

 

If you're passing a full XML string you can follow the same approach, just put the full XML string into each line of the parameter file.

 

0 Likes
subrat_perf Absent Member.
Absent Member.

Re: how to pass xml FILE as input parameter

Jump to solution

I passed the content of the file i.e full XML string as parameter and it works.

Thnks for the suggestion.

0 Likes
Highlighted
lenboi Absent Member.
Absent Member.

Re: how to pass xml FILE as input parameter

Jump to solution

I am trying to pass a full xml statement as a paramater and see that this was resolved. What did your paramater file look like? Do I need to make any changes to the xml (insert double quotes) to make loadrunner be able to process the file?

 

lenny

Tags (1)
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.