I have developed Virtual Service using RR pair, Protocol is TCP. In response to my earlier query, Salman had reverted where Test tool of LISA was used to set the values to response.
Now I want to use my interal program which will call LISA service and get response from LISA.
In my earlier example used testExec.setStateValue("response_Message", response); to set value to Tag "Message" (There was only one field in response)
Now I don't want to use LISA Test tool for getting the response . I want to set some values depending on condition.
For eg.
My Request
<XML>
<Fld1>1234</Fld1>
<Fld2>ABC</Fld2>
</XML>
Response
<XML>
<RFld1>{{Response_Fld1}}</RFld1>
<RFld2>{{Response_Fld2}}</</RFld2>
Match Script
String Resp1;
String Resp2;
if (!paramField1.isEmpty()) {
Resp1 = "Field1 is Valid";
}
if (!paramField2.isEmpty()) {
Resp2 = "Field2 is Valid";
}
How do I set the values to RFld1 and RFld2 without using LISA Test ?
ICICI_KV,
I have found some logical errors in the code as well which I have fixed. See the attachment with updates.
Let me know if it works fine with desired output.
Salman