Service Virtualization

 View Only
  • 1.  Scenario for Data Driven Virtual Service

    Posted Oct 03, 2019 02:36 PM
    Hi- I am in need of creating  the virtual service for following scenario-

    1. REST API for POST request
    2. Request structure varies but there is one field- ""accountableDocumentNum" which comes always and response needs to be selected based on this field.
    3. i want to ignore other fields and request structure and look only for -"accountableDocumentNum".
    4.  if that matches, send the response. If this doesn't match, make a live invocation.
    5. Since there are multiple requests, I want to drive this from excel sheet.
    6. When I create service, it adds all the arguments in image. Now I create data data sheet only for two arguments- ""accountableDocumentNum"" and "Response". If I do that, I ended up in mismatch.
    7. Not sure what is correct way to achieve this. I don;'t want to create 1000 of RR pairs for each structure of req and then create the service. and every time if any change in req, I don't want to re create the service.

    Please help how to achieve.

    Regards,
    Ritu


  • 2.  RE: Scenario for Data Driven Virtual Service
    Best Answer

    Posted Oct 04, 2019 03:46 AM

    Hi Ritu,

     

    For requirement 1 to 3:

     

    • Add a Request Data Manager DPH to your listen step, add one "Keep" action for the "accountableDocumentNum" argument. This will remove any other argument from your incoming request object except for the argument(s) you specify in a Keep action(s)
    • Edit your VSI to match this signature of an operation with one accountableDocumentNum argument

     

    Cheers,

    Danny

     

    ::DISCLAIMER::

    The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. E-mail transmission is not guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or may contain viruses in transmission. The e mail and its contents (with or without referred errors) shall therefore not attach any liability on the originator or HCL or its affiliates. Views or opinions, if any, presented in this email are solely those of the author and may not necessarily reflect the views or opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of authorized representative of HCL is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any email and/or attachments, please check them for viruses and other defects.






  • 3.  RE: Scenario for Data Driven Virtual Service

    Posted Oct 04, 2019 02:13 PM
    Hi Danny- This works and I could complete my work.

    Thanks much for your help!!! 

    Regards,
    Ritu