Forum Discussion

senthkum's avatar
senthkum
Contributor
5 years ago

Transfer values from one service to another services ?

Hi Team,

 

I have a requirement where I need to send the values of one servcies to another or all services.

 

Thanks

Senthil. M 

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    Hi,

     

    Can you provide more details?
    Considering, that service virtualization is an imulation of the real service, how is it expected to function in real life?

     

    • senthkum's avatar
      senthkum
      Contributor

      Hi Alex,

      I have 2 services, Now I want the value of Customer Number from Servcie 1- ABCD interface response. So, I can use them in createsomething interface resposne of Servcie 2.

      Is that posible to capture and transfer the values from one service to another services ?

       

       

       

      Thanks

      Senthil. M

      • AlexKaras's avatar
        AlexKaras
        Champion Level 3

        Hi,

         

        Thank you for the screenshots, but I am still not sure that I got the use case...

        So... It is expected that your tested application will interact with two web services. These web services are now virtualized as Service1 and Service2.

        A) In a real life, your application is going to send a request to Service1 and get a response. Some data from this response can be used to create a request to Service2. So it is your tested application that is responsible for the values transfer, not the services.

        B) I can imagine a scenario with a tightly coupled web services, so that when Service1 receives a request, it sends additional request to Service2, waits for the response and only then responds to the client. I don't think this is your case, but if it is, then you should send a request to Service2 from within the request handler of Service1. Again, I don't see the need for the values transfer.

         

        What I am missing in your use case?

         

        If option A) corresponds to your use case but there is no tested application yet, you may consider to use SoapUI. Set it to consume Service1 and Service2 and create a test that will send a request to Service1, process the response and request Service2 using some data returned from Service1.