DevTest VS: Using multiple JSON Path filters causes "number of filters exceeded 100" error.
search cancel

DevTest VS: Using multiple JSON Path filters causes "number of filters exceeded 100" error.

book

Article ID: 191995

calendar_today

Updated On:

Products

CA Cloud Test Mobile CA Application Test

Issue/Introduction

The Virtual Service that needs to parse multiple elements in an incoming request using multiple JSON Path filters shows the following error message:
Exception executing Step: The number of filters on the step Virtual HTTPS Listener has exceeded 100
The incoming request has 120 elements that need to be parsed.
How can each element be parsed without causing the error.

Environment

Release : 10.5, 10.6

Component : CA Service Virtualization

Resolution

There is a maximum of 100 filters for the Listener step.
Rather than creating a filter for each element, retrieve them in a list of elements.
For example a JSON request like: 
{"data":{"requestID":"REQ123","elements":[{"elementId":"61494724221"},{"elementId":"61487745312"},{"elementId":"61494724223"}...

With JSON Path filter:
$.data.elements[*].elementId

This results in:
["61494724221","61487745312","61494724223"...

To address each element in a loop with a counter property, use the following JSON Path filter:
$.[{{counter}}]

For counter=0, this results in 61494724221
Then for counter=1, this results in 61487745312
etc.

Additional Information

http://techdocs.broadcom.com/content/broadcom/techdocs/us/en/ca-enterprise-software/devops/devtest-solutions/10-5/reference/filter-descriptions/json-filters/json-path-filter.html