how to pass xml FILE as input parameter (1185 Views)
Reply
Occasional Advisor
subrat_perf
Posts: 21
Registered: ‎02-03-2012
Message 1 of 3 (1,185 Views)
Accepted Solution

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.

Valued Contributor
Nathan Bramble
Posts: 51
Registered: ‎02-22-2011
Message 2 of 3 (1,159 Views)

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
subrat_perf
Posts: 21
Registered: ‎02-03-2012
Message 3 of 3 (1,155 Views)

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.

The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.