Service Virtualization

  • 1.  Two specific transactions with same signature and two different responses

    Posted Apr 29, 2019 07:22 AM

    Hi Team,

     

    I am working on scenario where I have to handle two same signature requests with two different responses.

    Transport protocol is JMS. There is no correlation id and message selector approach used during creation of VS.

    I know duplicate requests follow a round robin approach to send the response but I want based on request

    response should be selected from VSI.

     

    Can we achieve this  without match script?

     

    Your inputs would be very much appreciated.

     

    Thanks in Advance.



  • 2.  Re: Two specific transactions with same signature and two different responses

    Broadcom Employee
    Posted Apr 29, 2019 11:24 AM

    So you have response A and response B, the request has the same signature. So far, this is not something special. Maybe it becomes special based on your next answer: what piece of data in the request do you want to use to distinguish between scenario A and scenario B?

     

    Cheers,

    Danny



  • 3.  Re: Two specific transactions with same signature and two different responses

    Posted Apr 30, 2019 02:23 AM

    Hi Danny,

     

    Thanks for your reply.

     

    below is the scenario given.

     

    Request 1 :

     

    Val1 = XYZ

    Val2 = 123

    Val3 = $500

     

    Request 2 :

     

    Val1 = XYZ

    Val2 = 123

    Val3 = $500

     

     

    Val2  argument having dynamic value.

     

    Two different response configured for both requests like “Response A” configured for Request 1 and “Response B” configured for Request 2.

     

    When application is expecting “Response B”  as a response due to round robin approach I am getting “Response A” as a response configured for Request 1.

     

    Thanks in Advance.



  • 4.  Re: Two specific transactions with same signature and two different responses

    Broadcom Employee
    Posted Apr 30, 2019 02:58 AM

    Hi,

     

    From your above example it is still not clear what piece of data or metadata or header data from your request is used to make a decision whether you are in scenario 1 (request 1 --> response A) or scenario 2 (request 2 --> response B).

     

    Your virtual service is simulating a real live system, so how does your live system know if it is getting request 1 or request 2? What business logic inside the live system results in response B when it receives a request 2, and alternatively a response A when it gets a request 1?

     

    Cheers,

    Danny



  • 5.  Re: Two specific transactions with same signature and two different responses
    Best Answer

    Posted May 03, 2019 02:00 AM

    Thanks Danny..

    I was missing some link. Now I am able to handled those responses.