LoadRunner Practitioners Forum
Showing results for 
Search instead for 
Do you mean 

how to pass xml FILE as input parameter

SOLVED
Go to Solution
Highlighted
Occasional Advisor

how to pass xml FILE as input parameter

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.

3 REPLIES
Trusted Contributor

Re: how to pass xml FILE as input parameter

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.

 

Occasional Advisor

Re: how to pass xml FILE as input parameter

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

Thnks for the suggestion.

Occasional Contributor

Re: how to pass xml FILE as input parameter

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