Hi,
I am trying to virtualise a REST api that takes a request like this: /api/v1/service/{policy}/currentPerformance?valuationDate=2015.02.15,2014.02.15,2013.02.15 (the number of dates can go up to 14)
In Lisa (i'm using 7.5.2) it only seems to recognise the dates as one parameter rather then using the comma to separate them, any ideas?
Thanks
I saw this at a customer site when using 7.5.1. I do not remember if the list was comma or semi-colon separated though.
We added a Scriptable DPH that took the argument (in your case valuationDate) and split it on the ",". Then, for each element we created a valuationDate_1, valuationDate_2, etc. argument and placed these on the lisa_vse_request Arguments list.
You need to determine if the DPH should only perform this action on the operation you mentioned. For example, If operation not equal to "GET /api/v1/service/{policy}/currentPerformance", exit the DPH; otherwise, get the Arg List, retrieve the valuationDate argument, split it and place your argument key / value pairs onto the list. If you are able to record from RR Pairs or using live recording, you can add (copy/paste) this DPH into the recorder so the VSI is generated the way you want.
Out of curiosity, in your Service Image, for this request, does the Meta Data tab for the specific transaction contain a set of HTTP-Path-Parm values? I seem to recall we saw this in in 7.5.1. If by some chance, your valuationDate shows up in Meta, you could do basically the same except in this case, get the request's MetaData key and value array, loop over it and add in the args HTTP-Path-Parm-1, -2, -3, etc. into the arg list. I do not remember the circumstances that caused this situation though.
Joel