search cancel

Service created through recorded transaction with API don't work. The normal parameters are not created.


Article ID: 216601


Updated On:


Service Virtualization




The creation of a virtual service through recorded transaction yields different results when done using the Portal UI and when using the Virtual Service Invoke API v2.


When creating a service through recording using the Portal UI, URLPARAMS and URI rules are correctly recognized and set.
In screenshot 1.png and 2.png, a service was created through recording the “Cars Example Service” and it worked correctly.

In fact, the virtual service can answer to /inventory/carInventory/{URLPARAM0} requests, even for cars that have not been recorded.

Image 1:



Image 2:

If instead the same service is created through recording using the Virtual Service Invoke API v2
(as described here: )
then no {URLPARAM} is found in the vsi (3.png) and no URI Rule is set in the vsm (in the Data protocol filters, inside the HTTP/S listener node) (4.png).

image 3:

Image 4:


As a result, the virtual service can only respond to the exact requests that were recorded:




If instead a different car is queried, the virtual service cannot match the request (5.png)

image 5:

The same problem appears even when adding new transactions to an existing virtual service through recording, by setting its Execution Mode in "Learning Mode"





Release : 10.6

Component : CA Service Virtualization



In the documentation, there is an optional step to add a Data Protocol that if executed will cause an issue



The client was doing an optional step to add a data protocol which caused the Automatic creation of the URL Parameters to not be created.

DevTest only will review transactions on the first pass and add URL if no Data Protocol is added.
This sends the application through an analysis phase that will do a parameter substiation.

If you add a Data Protocol or you add a transaction this process is not done.