Service Virtualization

 View Only
  • 1.  Ignore dynamic dates in Response

    Posted Mar 20, 2020 09:38 PM
    Team- I am creating a services with RR pairs- SOAP, REST. There are some of the dates in response getting created as dynamic dates. I don't want to have any dynamic date in response. How can I achieve this. I need the response as is what is there in RR pair- no dynamic dates, no magic string.

    I have many RR pairs and can't replace the response manually.

    Appreciate your quick help.

    Regards,
    Ritu


  • 2.  RE: Ignore dynamic dates in Response
    Best Answer

    Posted Mar 21, 2020 04:12 AM

    Hi,

     

    I am not aware of any "supported" way of achieving this. There are some unsupported ways so use the below at your own discretion.

     

    • If this is a one-time fix or something you need to do sporadically then I would open up the generated VSI in Notepad++ and do a regex-replace-all and convert all magic date strings back to their original content. The original data can be found at the end of the magic date expression between the symbols. Use a regex group to capture what is between those symbols. From the top of my head maybe something like this:
      • Find: \{\{=doDateDeltaFromCurrent.*;/\*(.*)\*/\}\}
      • Replace: $1

     

    • In your local.properties you could redefine the properties lisa.vse.datechecker.top.priorityorder and/or lisa.vse.datechecker.date.priorityorder  and remove your specific date format in those redefinitions.

     

    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: Ignore dynamic dates in Response

    Posted Mar 23, 2020 10:01 AM
    Thanks much Danny. I am going to try the solution and see if that helps.

    Also, this could be a very common requirement to have just static responses and no dynamic values to it. Surprise if we don't have any straight forward solution to it:(

    Thanks much again. I will post further updates.

    Regards,
    Ritu