How to exclude magic string for timestamps while creating virtual service
search cancel

How to exclude magic string for timestamps while creating virtual service

book

Article ID: 227960

calendar_today

Updated On:

Products

Service Virtualization

Issue/Introduction

We are seeing higher response time for a virtual service when created using API v3. The API v3 automatically makes timestamp as magic string. For a response with 1000+ timestamps, it will take that many number of conversions during responding which might cause higher response time.

How can we disable Magic String for timestamps while creating VS

Environment

Release : 10.7 or newer

Component : DevTest API

Resolution

Please follow the below steps :  

Create a separate VSE only name it something like VSE_noMagicDates
Modify that VSEs VirtualServiceEnvironmentService.vmoptions file and add the following lines
-Dlisa.vse.datechecker.top.priorityorder
-Dlisa.vse.datechecker.date.priorityorder
-Dlisa.vse.datechecker.time.priorityorder
-Dlisa.vse.datechecker.bottom.priorityorder
 
Notes: 
  • All Virtual Services created on this VSE will not create Magic Dates for a VS created via v3 API
  • If a Date in the Response is the same exact value as a date in the request it will be a Magic String rather than a Magic Date. example: <AccountCreated>{{=request_RequestXML_OTP_IN_AccountCreated;/*2017-09-05*/}}</AccountCreated>
  • Other VSEs connected to the Registry will create VS with Magic dates unless those lines are added to the VirtualServiceEnvironmentService.vmoptions file
  • Virtual Services created on other VSEs with Magic dates (ie  doDateDeltaFromRequest works) 

This change is made only to 1 VSE and you don't have to changes to other VSE environments.  

 

Additional Information

See below properties specified in the blog.

https://community.broadcom.com/communities/community-home/librarydocuments/viewdocument?DocumentKey=50e88efa-6b4c-47bc-b811-56ec84c70bb8