Hi Mario,
I was able to extract response into a variable using the below script in both modes i.e. Normal and Live Invocation. I have used a do nothing step separately for extracting the response using script. Then variable "
RespBody" is used for saving the property into a file. In both modes, different responses are being captured in files.-----------------------------
// This script should return a boolean result indicating the assertion is true or false
import com.itko.lisa.VSE;
import com.itko.lisa.vse.stateful.model.Request;
import com.itko.util.ParameterList;
import com.itko.util.Parameter;
import com.itko.lisa.vse.stateful.model.TransientResponse;
responseList = testExec.getStateObject("lisa.vse.response");
TransientResponse response = responseList.get(0);
String respText = testExec.parseInState(response.getBodyText());
testExec.setStateValue("RespBody",respText);
_logger.info("BODY"+respText);
return true;
-------------------------------
Kind Regards,
Vaibhav J
Original Message:
Sent: 08-28-2019 05:04 AM
From: Mario Pogoda
Subject: Response from live system
Hi,
How can I get body response from Live system in Scripted Association?
My virtual service is in "Live Invocation" mode.
This code working only in Most Efficient:
import com.itko.lisa.vse.stateful.model.TransientResponse;
responseList = testExec.getStateObject("lisa.vse.response");
TransientResponse response = responseList.get(0);
String respText = testExec.parseInState(response.getBodyText());
testExec.setStateValue("RespBody",respText);
_logger.info("BODY"+respText);
return true;
THX