Not able to create Virtual Service with Live Invocation using Invoke API (Curl Command)
search cancel

Not able to create Virtual Service with Live Invocation using Invoke API (Curl Command)

book

Article ID: 227687

calendar_today

Updated On:

Products

Service Virtualization

Issue/Introduction

You would like to create Virtual Service with Live Invocation using Invoke API (Curl Command), but could not find this option in config. 

You requirement is to create and deploy Virtual Service with Live Invocation Step.

  • This should include different executions modes like:
    • Pass requests to the live system (Live Invocation)
    • Fall through to live system if no virtualized response (Stand In)
    • etc.

What are the parameters for all available execution modes in Config?

Environment

Release : 10.7 or newer

Component : DevTest API

Resolution

  1. Create VS with v3 API and config that has target Endpoint
  2. Change mode using Lisa Invoke API:

    PUT 'http://DevTestRegistry:1505/api/Dcm/VSEs/VseServer/VsNAme' \ --header 'Content-Type: application/vnd.ca.lisaInvoke.virtualService+xml' \ --header 'Authorization: Basic c3Zwb3dlcjpzdnBvd2Vy' \ --header 'Cookie: JSESSIONID=10tu9fooo92t1127qs211gisol' \ --data-raw '<VirtualService xmlns="http://www.server.com/lisa/invoke/v2.0" name="A1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.server.com/lisa/invoke/v2.0VirtualService.xsd" href="http://localhost:1505/api/Dcm/VSEs/VSE/A1" type="application/vnd.ca.lisaInvoke.virtualService+xml"> <ExecutionMode>Live System</ExecutionMode> </VirtualService>'


    {
    "virtualService": {
    "version": "2",
    "name": "Analyze_Live_2",
    "description": "VSE_LIVE",
    "status": ""
    },
    "transportProtocol": {
    "typeId": "HTTP",
    "basePath": "/",
    "useGateway": true,
    "duptxns": true,
    "hostHeaderPassThrough": false,
    "recordingEndpoint": {
    "useSSL": false,
    "host": "localhost",
    "port": "8988"
    },
    "targetEndpoint": {
    "host": "TestSERVERhost.net",
    "port": "8080"
    }
    },
    "dataProtocol": {
    "forRequest": true,
    "typeId": "RESTDPH"
    }
    }