Service Virtualization

 View Only
  • 1.  How to Create a dynamic basepath

    Posted Dec 28, 2015 02:26 AM

    Hi

     

    We have multiple HTTP Virtual services to be deployed on same port. The basepath of the virtual services has a parameter (ex SessionID)  which can be dynamic.

     

    Ex: Basepath of service A :  a/b/123/c

    Basepath of Service B  a/b/123/d

     

    Say ,Here 123 is sessionId and it can be any random value in runtime

     

    How can we implement this feature in CA DevTest?



  • 2.  Re: How to Create a dynamic basepath

    Broadcom Employee
    Posted Dec 28, 2015 07:10 AM

    Dynamic URL parameters are fully supported if you choose the REST data protocol handler during virtual service generation. If it's not a REST service but it still uses that type of mechanism, it might be best to delete the basepath during generation and deal with the changing URL yourself in a scriptable or a custom DPH.



  • 3.  Re: How to Create a dynamic basepath

    Posted Dec 31, 2015 01:37 AM

    Hi Rick,

     

    Thanks for your inputs.

     

    Our requirement is to handle request before it comes to DPH. As we have more than one VS (VSM) , so based on endpoint/ basepath it should decide which VS should be called.

     

    As in our case  we have 2 VSMs Service_A and Service_B

     

    Basepath of service_A :  a/b/123/c

    Basepath of Service_B  a/b/123/d

     

    So if endpoint is a/b/123/c , request should go to Service_A and

    if endpoint is a/b/123/d , request should got to Service_B

     

    But as here basepath is having session ID parameter which is dynamic, I am not able to implement it in Listen step of VSM



  • 4.  Re: How to Create a dynamic basepath

    Posted Jan 03, 2016 10:28 PM

    Hi Ekta,

    Is there a mandate in your scenario to mantain multiple VSM? If not I would think of having multiple VSI with single VSM. And use the scriptableDPH to decide which VSI to be called.

    Thanks,

    Udhaya



  • 5.  Re: How to Create a dynamic basepath

    Posted Jan 03, 2016 11:07 PM

    Hi Udhaya,

     

    Yes we are having few additional execution steps (like DB update/JMS etc ) in each service so we are having different VSMs.

     

    Thanks

    Ekta



  • 6.  Re: How to Create a dynamic basepath

    Posted Jun 20, 2016 04:28 PM

    A feature that allowed regex to be used in setting the base path would be helpful to me as well!