Service Virtualization

  • 1.  How to get the request in my javascript step?

    Posted Aug 23, 2016 10:28 AM

    Hi,

     

    I have a request which I am storing in my Virtual Listener but when i try to retrieve the values of that request using getArguments i get the arguments that get stored with my XML request and so i am not able to get the content of my XML.

    Can someone pls help on this.

    Thanks.

     

    Careyann



  • 2.  Re: How to get the request in my javascript step?
    Best Answer

    Posted Aug 23, 2016 10:59 AM

    Careyann,

     

     

    To get the request body from VSE Request object try this in the java script step.

     

    ((com.itko.lisa.vse.stateful.model.Request)testExec.getStateObject(“lisa.vse.request”)).getBodyAsString();

     

     

    Thanks,

    Vamsi