Service Virtualization

 View Only
  • 1.  REST Virtualization with complex JSON Payload

    Posted Nov 01, 2017 09:43 PM



    I need to do the REST virtualization with RR pairs. The request file is as follows:


    POST /air-shopping/carInsurance.action HTTP/1.1
    Content-Type: application/x-www-form-urlencoded




    It has a Json structure payload which can be simplified as below, for better understanding:






    My requirement is that, I should be able to set the independent key value pairs inside the {SomeChildJson} as the arguments for the VSI, so that the incoming requests can be identified uniquely and respective responses can be sent.


    How do I do it? What data protocols to use to break it into separate arguments?@@@@@

  • 2.  Re: REST Virtualization with complex JSON Payload

    Posted Nov 02, 2017 03:58 AM

    Hi Malikaarjun, 

    As I understand from your question you want to identify the each JSON element individual key value pair in your VS Image file and you will apply the comparison based on some value i.e.  sellerId 


    JSON reqquest you have shared is not in proper JSON format. I have corrected it and created a VS by using the same request and I can see every element individually in my VS. 

    Correct JSON request :-



    My VSI look like as below 




    Here I can see every element individual and apply the comparison operator as per the need.