One approach for HTTP-based services is to set up a dummy service that routes to the other services. An abbreviated example is:
- Start with a sample VSM having all the steps
- Remove all the steps leaving just a the LISTEN -> LIVE INVOCATION -> RESPONDER steps. You will not likely need tracking, failover, learning and all the other modes in this service. Additionally, you can remove the assertions/branches for these from the steps.
- Add script logic of your choice (i.e., Scriptable DPH, scripted assertion, JSR step, etc.) to examine the incoming request and decide which endpoint the request is sent to.
- Using this logic set a target Host and target port property value on TestExec ( i.e., testExec.setStateValue("HOST", "hostName1"); )
- In the Live Invocation step, use {{ }} notation to refer to your target {{HOST}} & {{PORT}}
- In the Live Invocation step, do NOT check format step response as XML.
- The Responder step should send its response from the lisa.vse.response property
The idea is that this service marshals requests and responses but does not manipulate the request or the response.
If your scenario has to support both SSL and non-SSL targets, then you will need two Live Invocation (one with and one without SSL) steps and some branching logic to decide which one to use. Both steps still branch to the Responder step. You will not be able to LISTEN for both HTTP and HTTPS with the same service though.