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

How to exclude magic string for timestamps while creating virtual service


Article ID: 227960


Updated On:


Service Virtualization


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


Release : 10.7 or newer

Component : DevTest API


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
  • 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.