|
lr_xml_get_values函数可以取到ExamID_ALL数组。请问如何随机获取其中之一,并保存到{ExamID}中供下次web service call调用?
web_service_call(...);
NumOfValues = lr_xml_get_values("XML={response}",
"Query=/Envelope/Body/SearchResponse/ResultSet/*/value[16]",
"ValueParam=ExamID_ALL",
"SelectAll=yes", LAST);
srand( time(NULL) );
i = rand() % (NumOfValues + 1);
sprintf( E_examid, "Retrieved value %d : {ExamID_ALL_%d}", i + 1, i + 1 );
lr_output_message(lr_eval_string(E_examid));
lr_output_message(lr_eval_string("firstExamID = {ExamID_ALL_1}"));
soap_request("..., "SOAPEnvelope=..."
"<requestedProcedureID xmlns=\"\">{ExamID}</requestedProcedureID>"
"Snapshot=t21.inf", "ResponseParam=response",
LAST); |
|