I have a VSI created from RR pairs. But when creating the VSI, the WS-Security configuration was ignored as the RR pairs were valid only for 5 mins, and by the time the VSI was created it had expired and in the VSI the Response was showing Error response not validated.
This was solved by not configuring the WS-Security Headers while creating the VSI but added to the VSM after creation. In the VSI the soap Headers part was left empty and the Responder step created the WS-Security Headers in it on the fly.
During learning mode, the responses in the VSI are updated from the Live Service. But when we invoke for on updated Transaction, the WS-Security from the Live service is present and the Responder step in the VSM adds one set of WS-Security Headers. At the client side hence i observe two sets of WS-Security Headers present: One from Live Service during Learning and one added by the Responder.
Is there a way to update the WS-Security Headers instead of just adding a new set?
Or a way to delete the WS-Security Headers from the responses in Learning Mode and rely on the Responder to add the WS-Security Headers everytime?
As discussed today, can you please try by adding sample logic below in "LIVE_INVOCATION_STEP" to modify incoming response during learning mode and update the same in vsi.
import com.itko.lisa.vse.stateful.model.TransientResponse;import com.itko.lisa.vse.stateful.model.Response;import java.util.List;
List responseList = testExec.getStateObject("lisa.vse.live.response");TransientResponse response = responseList.get(0);String respText = testExec.parseInState(response.getBodyText());
// Add logic here to remove headers from response..
Thanks & Regards