Forum Discussion

hoangvu's avatar
8 years ago

How do I consume an async service using SoapUI ?

I have an async service using WCF. I want to consume this service by Soap UI. I read document about Soap UI and found that we can use mock service to test async service. 

However, when I use mock service, it seems that we make a request to mock service, don't use real service and use fake data that is created from mock response.


Question: I want to test async service by making a request to real service. Can I do that ?

1 Reply

  • KarelHusa's avatar
    Champion Level 2

    Yes, you can test asynchronous services with SoapUI. I do that as well.


    This is one of possible scenarios:

    1. You call the service with an initial request. The service responds synchronously, either with a message or just with HTTP 200, depends how the service is designed. If your service uses WS-Addressing, you need to specify your callback address in ReplyTo field (otherwise you need to use a different way to tell the service what is the callback endpoint).


    2. You start a receiving webservice within your SoapUI and wait for the asynchronous service to invoke it. You do this with SOAP Mock Response test step (here you specify path, port, timeout etc.)


    3. The asynchronous service invokes your service. You can see the response, the scenario is finished. You can add assertions to check the response.


    The advantage of this scenario is that you cover the test end-to-end with SoapUI, from initial request to the asynchronous response. The drawback is that the server has to respond to your SoapUI workstation, which is not always permitted for security reasons.