Service Virtualization

 View Only
  • 1.  REST Data Protocol with URLParam failing for 4 digit

    Posted Feb 18, 2020 03:41 AM
    Hi Team,

    Virtualized json request and response using REST Data Protocol with the match style as Operation match.

    Request contains a random value and it is parameterized as {URLPARAM0} and Rule has also been added.


    Operation: GET /v1_b6072607e6fda65fe3a424a0d57a42b676071d6b_0275/accounts/{URLPARAM0}/paymentmethods/{URLPARAM1}/

    Test Scenarios:

    SUCCESS SCENARIO : When tested using 5 digits and above for {URLPARAM0} I am getting success response.
    http://localhost:443/v1_b6072607e6fda65fe3a424a0d57a42b676071d6b_0275/accounts/12345/paymentmethods/1/

    FAILED SCENARIO: When tested using 4 digits or below for {URLPARAM0} I am getting 404 URL not found response.
    http://localhost:443/v1_b6072607e6fda65fe3a424a0d57a42b676071d6b_0275/accounts/1234/paymentmethods/1/


    Can we limit the length for URLPARAM fields from local.properties or lisa.properties file so that URLPARAM should accept even single digit also.

    Please suggest.

    Attached Screenshots.


    Thanks,
    Anupam


  • 2.  RE: REST Data Protocol with URLParam failing for 4 digit

    Posted Feb 18, 2020 04:03 AM

    Hi,

     

    You need to look in the VSE inspection view to find out if there was a match and which response was returned. I would expect that at least the META response (if match style is 'Operation') can always return a good response for whatever value of URLPARAM0. How is the HTTP Return code configured of your META Response?

     

     

     

    Cheers,

    Danny

     

    ::DISCLAIMER::

    The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. E-mail transmission is not guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or may contain viruses in transmission. The e mail and its contents (with or without referred errors) shall therefore not attach any liability on the originator or HCL or its affiliates. Views or opinions, if any, presented in this email are solely those of the author and may not necessarily reflect the views or opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of authorized representative of HCL is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any email and/or attachments, please check them for viruses and other defects.






  • 3.  RE: REST Data Protocol with URLParam failing for 4 digit

    Posted Feb 18, 2020 05:14 AM
    Thanks Danny for the response.

    I am not seeing the hits when firing the request for the URLPARAM that has less than 5 digit. HTTP Return Status Code for both META nd EXACT is 200 OK.

    Thanks,
    Anupam


  • 4.  RE: REST Data Protocol with URLParam failing for 4 digit

    Posted Feb 18, 2020 05:24 AM

    "... I am not seeing the hits ...", I assume you mean in the VS's Inspection View in the Portal?

    Do you see the transaction count going up for this virtual service when sending a less-then-5-digit request?

     

    (Also doublecheck that within your VSE you have not another virtual service actively running on the same port, in that case the VSE would distribute the incoming requests in a round-robin fashion. I have been stumped by this a number of times when I got a response on a request but couldn't find evidence in the inspection view where it came from)

     

    Cheers,

    Danny

     

    ::DISCLAIMER::

    The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. E-mail transmission is not guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or may contain viruses in transmission. The e mail and its contents (with or without referred errors) shall therefore not attach any liability on the originator or HCL or its affiliates. Views or opinions, if any, presented in this email are solely those of the author and may not necessarily reflect the views or opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of authorized representative of HCL is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any email and/or attachments, please check them for viruses and other defects.






  • 5.  RE: REST Data Protocol with URLParam failing for 4 digit
    Best Answer

    Posted Feb 18, 2020 06:18 AM

    HI Danny,

     

    I could figure out the issue. Issue was with the basepath in vsm where 5 digit param has been hardcoded. Removed the same and now I am getting expected response.

     

     

    Thanks for your support.

     

    Thanks,

    Anupam