Hi Shivani
You can have a script step if you want to tweak the response by using parts
of the URL.
Please just place the attached MAR file that has a simple VS that extracts
the last part of the URL and then returns the UPPERCASE form of it.
for ex: If the URL is :
http://localhost:17008/api/v1/helloworldThen the VS returns HELLOWORLD as response.
This is just a reference to understand how to extract parts of the URL
using API calls. Please inspect and understand the script step in the VSM
design.
To deploy this MAR file, just place the MAR file in LISA_HOME/vseDeploy
folder. The VS would start listening on port 17008.
Please let me know if you have any questions.
Sample output from the VS.
[image: image.png]
[image: image.png]
--
This electronic communication and the information and any files transmitted
with it, or attached to it, are confidential and are intended solely for
the use of the individual or entity to whom it is addressed and may contain
information that is confidential, legally privileged, protected by privacy
laws, or otherwise restricted from disclosure to anyone else. If you are
not the intended recipient or the person responsible for delivering the
e-mail to the intended recipient, you are hereby notified that any use,
copying, distributing, dissemination, forwarding, printing, or copying of
this e-mail is strictly prohibited. If you received this e-mail in error,
please return the e-mail to the sender, delete it from your computer, and
destroy any printed copy of it.
Original Message:
Sent: 5/19/2023 6:50:00 AM
From: Sankar Natarajan
Subject: RE: How to convert substring of dynamic url parameter into upper case ?
Hi Shivani
Please refer to this documentation on how to extracts parts of the
request URL.
https://techdocs.broadcom.com/us/en/ca-enterprise-software/devops/devtest-solutions/10-7/using/using-service-virtualization/service-virtualization-concepts/parsing-uris-in-http-requests.html
Please let me know if you have any questions.
--
regards
Sankar Natarajan
--
This electronic communication and the information and any files transmitted
with it, or attached to it, are confidential and are intended solely for
the use of the individual or entity to whom it is addressed and may contain
information that is confidential, legally privileged, protected by privacy
laws, or otherwise restricted from disclosure to anyone else. If you are
not the intended recipient or the person responsible for delivering the
e-mail to the intended recipient, you are hereby notified that any use,
copying, distributing, dissemination, forwarding, printing, or copying of
this e-mail is strictly prohibited. If you received this e-mail in error,
please return the e-mail to the sender, delete it from your computer, and
destroy any printed copy of it.
Original Message:
Sent: 5/19/2023 3:17:00 AM
From: Shivani Gupta
Subject: How to convert substring of dynamic url parameter into upper case ?
Hi Team,
We have a new requirement in GET virtual service they want to store the uppercase of substring of dynamic parameter.
Operation : GET/api/vi/678a5fvg76
Dynamic Parameter : 678a5fvg76
In response they want to store the substring in uppercase