Hi Jeff, try adding a scriptable DPH in the LISTEN Step to get the URI from the incoming request's MetaData and then perform your logic on it.
Once a property is set in TestExec, you can use the property {{ }} notation, in the example below {{fl_newURI}}, in the Live Invocation Step to use the value.
%beanshell%
import com.itko.util.ParameterList;
ParameterList metadata = lisa_vse_request.getMetaData();
String sUri = metadata.get("HTTP-URI") ;
< Add logic to split & build the override URI >
testExec.setStateValue("fl_newURI", <overrideUriVariableGoesHere>);
In the VRS file, the logic will go inside the CDATA tag. The safest way to get this into the VRS is to use Workstation to perform the recording, set up the protocol handlers, and right before finalizing the recording, CLICK the small folder Icon above the Finish button and save the VRS file. You can hand roll the VRS, but that is a bit more challenging. The resulting VRS will contain an XML block that looks something like this:
:
:
<Protocol type="com.itko.lisa.vse.stateful.protocol.scriptable.ScriptableDataProtocolHandler">
<updateRequestScript><![CDATA[%beanshell%
import com.itko.util.ParameterList;
ParameterList metadata = lisa_vse_request.getMetaData();
String sUri = metadata.get("HTTP-URI") ;
< Add logic to split & build the override URI >
testExec.setStateValue("fl_newURI", <overrideUriVariableGoesHere>);
]]>
</updateRequestScript>
</Protocol>
</RequestSide>
</Transport>
:
:
:
I am not exactly sure which property in the Live Invocation holds the replacement value. It may be something like <replacementUri> or <replacementURI>.