Modifying host parameter in header in live invocation.
search cancel

Modifying host parameter in header in live invocation.

book

Article ID: 134194

calendar_today

Updated On:

Products

CA Application Test

Issue/Introduction

There is a host parameter in VSE request header and sometime this need to be modified with a new value when request go to LIVE system.

Environment

Release : 10.x

Component : CA Service Virtualization

Cause

Customization.

Resolution

Using the below code in a Scriptable DPH in VSM--> HTTP Listen step should help modify the host parameter value in the request header.

---------------

 %beanshell% 

import com.itko.lisa.vse.http.HTTPTransaction; 

HTTPTransaction transaction = (HTTPTransaction)testExec.getStateObject("lisa.vse.http.current.transaction"); 

transaction.updateRequestHeaderBlockHost("SCRIPTABLEHOST.com"); 

---------------