When creating a Virtual Service from a swagger with the "Service Virtualization API v3", it is impossible to specify a basepath different from "/".
10.6.0.1011
POST /lisa-virtualize-invoke/api/v3/vses/VSE/services HTTP/1.1
Host: localhost:1505
Accept: application/json
[…]
Content-Disposition: form-data; name="config"
{
"virtualService": {
"version": "1",
"name": "exampleService",
"description": "",
"status": ""
},
"transportProtocol": {
"typeId": "HTTP",
"basePath": "/example",
"recordingEndpoint":{
"useSSL":false,
"host": "localhost",
"port": "12345"
}
},
"dataProtocol": {
"forRequest": true,
"typeId": "RESTDPH"
}
}
Content-Disposition: form-data; name="deploy"
true
Content-Disposition: form-data; name="inputFile1"; filename="exampleSwagger.json"
Content-Type: application/json
(data)
Response:
{
"_links": {
[…]
"serviceName": "exampleService",
[…]
"resourceName": "12345 : http : : /example",
}
The virtual service "virtualService" deployed in "VSE" listens on http://localhost/example:12345
Response:
{
"_links": {
[…]
"serviceName": "exampleService",
[…]
"resourceName": "12345 : http : : /",
}
The virtual service "virtualService" deployed in "VSE" listens on http://localhost:12345
It looks like the service is deployed on a basepath given by the first character of the value of transportProtocol.basePath in "config".
E.g. if transportProtocol.basePath is set to "example", the service is deployed like this:
{
[…]
"serviceName": "exampleService",
[…]
"resourceName": "12345 : http : : e",
}
Modified basepath was not handled by the V3 API call code.
Release : 10.6
Component : CA Service Virtualization
The patch patch_DE492547_10.6.0_GA should be requested from support by raising a support case.
Step to apply.
- Stop the VSE component.
- Place the patch under LISA_HOME/lib/patches/ folder. Create the patches folder if not present already.
- Start the VSE component.