Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6736927
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:11:16+00:00 2026-05-26T11:11:16+00:00

We use SoapUI to mock web services to test our application (APP) before we

  • 0

We use SoapUI to mock web services to test our application (APP) before we have access to real webservices.

Creating a synchronous Mock Service which will return predefined response is straightforward. However I have to mock some asynchronous services where the APP sends a request, the SoapUI immediately responds back with confirmation (e.g. SUCCESS) and then after a predefined interval the SoapUI will call our application back (the APP is then acting as a server). I managed to do it using test case where first step is MockResponse, then delay and then MockRequest (to call our app).

The above works fine but I’d like to do it by scripting it directly in the Mock Reponse to avoid using Test Cases. I managed to write the script which when a Mock Service receives request it will fire the callback.

def project = result.mockOperation.mockService.project
// The API documentation doesn't say what finish is supposed to do but I try (doesn't help)
result.finish()
// Request that will be returned back - THE CALLBACK
def request = project.interfaces["LocationServicesOperation"].operations["ackLocation"].getRequestByName("Request 1")
sleep(4000)
request.submit(new com.eviware.soapui.impl.wsdl.WsdlSubmitContext(  ), false)

The issue with the above is that it will fire the callback BEFORE sending the response for the initial request. I tried using event handling in SoapUI PRO but I can’t get that working. In Wireshark I can see the communication like this:

1) APP request -> SoapUI 
2) SoapUI callback -> APP
3) APP confirms 2) -> SoapUI 
4) SoapUI confirms 1) -> APP

However it needs to be:

1) APP request -> SoapUI 
2) SoapUI confirms 1) -> APP
3) SoapUI callback -> APP
4) APP confirms 2) -> SoapUI 

The code above is actually from MockRunListener.onMockResult event in SoapUI Pro. the result.finish() doesn’t do the trick.

Thanks for any tips!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T11:11:17+00:00Added an answer on May 26, 2026 at 11:11 am

    I finally found a solution at http://www.eviware.com/forum/viewtopic.php?f=5&t=3542&p=12474&hilit=asynchronous#p12474

    The trick was instead of dispatching the request directly from within the response script to add the callback request to a test and then call the test. This will cause the mock runner to first send response to the request and after that run the test case.

    The advantage is that the test case is triggered dynamically and doesn’t need to run all the time.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We are planning to use SOAP UI Pro to test our Services (developed in
I have two code projects both using CXF to use web services. When I
I am developing an IOS application, which uses web services (SOAP/WSDL). I have built
I have to mock quite complicated java web service and I'm searching for the
We have received a WSDL from our client that we use to communicate with
I am using ASIHTTPRequest in my IOS application to call a wsdl/SOAP web services.
I have been working on a web services related project for about the last
For an application, I need to do a load test for a web service
We have two components: enterprise application X, and Web service Y We want to
We have couple of MS based web-services, visible as .asmx?WSDL links in intranet. There

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.