Unable to hit the VirtualServices JSON with array request matching when migrating to Devtest10.X

Document ID : KB000111966
Last Modified Date : 23/08/2018
Show Technical Document Details
Issue:
There is a JSON script like below:
{"aaaa":
  {"bbbbb":["<value1>","<value1>"]
  }
}
which is used for the request of the Virtual Service.

When using DevTest 9.X with "JSON" Data handler protocol, the argument names after recording are defined  as "aaaa_bbbbb_element_1" and "aaaa_bbbbb_element_2".
The format of the argument name is <entries of elements>_element_<ARGUMENT_NUMBER> style.

When using after DevTest 10.X, the "JSON" data protocol handler cannot be defined and only "JSON2" data protocol handler can be defined during the VSE recording.
Then the argument names after recording with "JSON2" data protocol handler are defined  as "aaaa_bbbbb_0" and "aaaa_bbbbb_1"
The format of the argument name is <entries of elements>_<ARGUMENT_NUMBER> style.

How do the users use the virtual services with "JSON" data protocol handler in DevTest 10.X?
Cause:
This type of question occurs in DevTest 10.0 or upper, because the "JSON" data protocol handler cannot be defined from DevTest 10.0 in VSE recorder and model editor.

 

.
Resolution:
There are three workarounds for this issue:
  1. The "JSON" data protocol handler cannot be defined in VSE recorder and model editor, But can be used in virtual service engine level. Then the first workaround is to deploy vsm/vsi file to VSE without editing from DevTest Workstation.
  2. If it is not hard to prepare the environment to record the new Virtual Service, then the second workaround is to record with "JSON2" data protocol handler by using the same traffic.
  3. The third workaround is to edit the vsm/vsi files based on the information of the arguments for the request in the DevTest Workstation.

 
Additional Information:
In DevTest 10.3 level, there is a debug patch which writes the "JSON" arguments and expected "JSON2" arguments for the Virtual Service with "JSON" data protocol handler in vse.log file. Please contact CA support if you need this debug patch.