AnsweredAssumed Answered

Reading an Xml tag using JavaScript in LISA

Question asked by kgirija on Dec 11, 2015
Latest reply on Mar 7, 2016 by kgirija

Hi,

 

Can anyone help me in this.

Am working on LISA.

Am new to webservice virtualization.

I need to virtualize a webservice which is having security header.

I have req&res pair.

But inorder to magisiting i need to read the request tag and assign the value to a varaibale.

I tried using javascript step in the VSM and tried to save the value in attribute using the XML path filter.

But still am unable to get the value into the variable.

I used the following code to read the XML

 

import javax.swing.JOptionPane;

vse_request = testExec.getStateValue("lisa.vse.request");

String request_bodytext = vse_request.getBodyText();

testExec.setStateValue("request",request_bodytext);

 

Can anyone suggest me how to do this.

 

Thanks in advance.

Outcomes