Forum Discussion

Achin_Gupta's avatar
Achin_Gupta
Occasional Contributor
15 years ago

How to test Asynchronus web method using soapUI.

Hi,
we are using SoapUI to test Web service and there is one asynchronus call that has to be tested. scenario is that one file is uploaded using upload web method and server waits for complete upload of file and then sends the response once upload is done. Upload request is not reaching to server. Please suggest.

5 Replies

  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi!

    Exactly how does the server send the response when the upload is done?

    regards,

    /Ole
    eviware.com
  • Achin_Gupta's avatar
    Achin_Gupta
    Occasional Contributor
    Actually need to test an Asynchronus WCF and web method sends the image for upload and then give call back to client and on the background another window service stores the image and parse the and then parsed image data is sent back as server response.
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi,

    hmm.. I'm not sure exactly what this means from an "HTTP-request-standpoint-of-view".. ie who is sending/receiving requests from whom during the entire transaction.. can you elaborate?

    (sorry for not understanding..)

    regards!


    /Ole
    eviware.com
  • Achin_Gupta's avatar
    Achin_Gupta
    Occasional Contributor
    Hi
    Let me elaborate a bit on the client-server interaction happening.

    We have a WCF service that exposes an operation that is called asynchronously, lets call it UploadAndProcessFile.
    For making it asynchronous, we have two corresponding BeginUploadAndProcessFile, and EndUploadProcessFile.

    From client side, this is how we call the method asynchronously.

                        IAsyncResult ar = client.BeginUploadAndProcessFile(file, null, null);
                        ar.AsyncWaitHandle.WaitOne();

                        EndUploadResult res = client.EndUploadProcessFile(ar);

    How can we perform a similar call from SoapUI ?
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    If I understand correctly, you can do this with two webservice requests, one calling the BeginUploadAndProcessFile function, and the other one calling the EndUploadProcessFile function. SoapUI does not have functionality yet to support Asynchronous operation in the manner you described, but you can put in a static wait in between the calls to ensure that the service has enough time to complete the processing of the file.

    How does the service signal to the client when the file processing is complete?

    /Nenad
    http://eviware.com