I would like to create a virtual service which effectively would act as a proxy through to some other endpoints, for example:
Client sends a REST post request in JSON format which has a body, one of the properties of the body will be customer.firstName. Depending on what the first name is, then do the following:1: firstName = Steve => forward the request onto another api endpoint, EG http://server/api/stubs
2: firstName = John => forward the request onto another different api, EG http://workstatios/api/real
3: firstName = NotAPerson => respond from the VSI with a canned response
We are currently using CA DevTest Workstation 184.108.40.2063.
Can this be accomplished?
Yes, the above requirement is possible to achieve in DevTest.You will be storing the incoming request in a property and using assertions based on the conditions you will routing to one of REST/SOAP steps and posting the request to the endpoints available.