Service Virtualization

Expand all | Collapse all

Add additional header values to Live Invocation step request

Jump to Best Answer
  • 1.  Add additional header values to Live Invocation step request

    Posted 07-12-2018 04:18 AM

    Hi all,

     

    I am trying to add specific header values to the request send to the live system by the Live Invocation step.

    Whatever I did, it is always the original request that is sent to the live system.

     

    Does anyone have any idea if it is possible to do that and how ?

     

    Thanks

     

    Regards,

    Vincent



  • 2.  Re: Add additional header values to Live Invocation step request

    Posted 07-12-2018 04:04 PM

    Hi Vincent,

    Usually, lisa.vse.request is the one goto LIVE system. Not sure what you changed, can you share the changes you made?

     

    If you want to add additional headers, you can do that using Scriptable DPH in the Listen step and set the additional headers. When you add Scriptable DPH it will provide sample code for adding the metadata parameters. You can try using that code.

     

    Can you try it and see if it helps? 



  • 3.  Re: Add additional header values to Live Invocation step request

    Posted 07-17-2018 08:45 AM

    Hi Prema,

     

    I just want to add a header value.

     

    Your solution is not working as the whole incoming request (headers also) is used by the Live Invocation step.



  • 4.  Re: Add additional header values to Live Invocation step request
    Best Answer

    Posted 07-13-2018 10:20 AM

    I think the issue is that philosophically and architecturally, adding data to an incoming request invalidates the intent of the consumer with regard to the request payload and headers.

     

    For this reason, the HTTP Current Transaction object is immutable. It seems that the VSM allows the addition of parameters, but it appears these parameters are not passed at runtime.

     

    One workaround I can envisage is to take the incoming request, add header parameters, and send the transaction as a REST or Webservice Call. Then, marshal the response from the live system back into the lisa_vse_response list.

     

    Perhaps, an idea should be raised to enable support of this User Story.



  • 5.  Re: Add additional header values to Live Invocation step request

    Posted 07-15-2018 02:18 PM

    Hi Vincent,

     

    Joel is correct.  You can't modify the request being sent in Live Invocation.

     

    I did, however, encounter a valid reason to do so.  At my current customer, we needed to modify the "Authorization" header to support Kerberos (because the request would be coming from a machine other than the original client).

     

    Engineering provided a patch for version 10.3.  It allows modification of the Authorization header only.  Still, if you think this would help you, let me know and I'll send you the patch.

     

    --Mike



  • 6.  Re: Add additional header values to Live Invocation step request

    Posted 07-17-2018 01:06 PM

    Hi Vincent,

     

    Please let us know if the patch I sent you helps.

     

    Thanks.

     

    --Mike