Forum Discussion

linebreaker's avatar
linebreaker
New Contributor
15 years ago

sending two responses for same service

Hello,

Here is what i want to do with soapUI..

There is a service that i want to implement, where

1. Request is sent to the server and a response is generated by soapUI mock service to the 'client'.
2. Once the response is sent another ack response is sent to the 'client' after 5 seconds.

Now, the 1st step is simple, the thing is that i an not able to send the ack response again to the client after the 1st step is done.
I just have the xmls of these request and responses.

Is there any way i can do it (either by simple soapUI utility or by using groovy)

Client ------ request ------>> Server (mock service running here )
Client<<------ response------ Server (mock service running here )
Delay 5 secs ( using 'sleep 5000' )
Client <<-------- Ack respone----- Server ( mock service running here, how do i do it?)
thanks..

3 Replies

  • Hi!

    You could set up a TestCase that contains first a 5 second delay and then the Ack request, the script of the first MockResponse could trigger this TestCase before returning "its" response.

    The script for launching the TestCase is straight-forward:

    def tc = mockResponse.mockOperation.mockService.project.testSuites["..."].testCases["..."]
    tc.run( null, true )

    One limitation would be that e you could only have one TestCase running at a time..

    Does that help?

    regards,

    /ole
    eviware.com
  • sahosri's avatar
    sahosri
    New Contributor
    Hi,

    can you please explain bit more about this solution? dose it send the 2nd response to the same requested url?