Eviware Forum

soapUI => soapUI => Topic started by: Tareque on November 07, 2007, 11:01:27 pm



Title: Asynchronous Testing using soapUI pro
Post by: Tareque on November 07, 2007, 11:01:27 pm
Hi
I am trying to Test an asynchronous request in soapUI pro using MockResponse. My requirement is that my service takes an Input XML which is processed and put in a JMS queue and an acknowledgment response is sent back to the client . The input XML also has a tag called <return-url>http://localhost:8181/AsyncTest</return-url>. The service then picks up the message from the JMS queue does further processing hits this url .
Given the above scenario is it possible   to use soapUI pro to create a listener that will listen for the service to send back a response after processing the message from the JMS queue. I am new to MockResonse so I am unable to figure this out, any help will be appreciated.
Thanks


Title: Re: Asynchronous Testing using soapUI pro
Post by: omatzura on November 07, 2007, 11:29:18 pm
Hi!

This should definitely be possible, it's the main use-case for the MockResponse TestStep.. you need to

1) add a MockResponse step to your testcase after the request
2) configure which interface/operation it should mock and the response it should return.
- You can add assertions for the incoming request just like for the response in a testrequest step. 

When running the TestCase, soapUI Pro will start a listener when it comes to your MockResponse step and wait for the incoming request as configured (ie port/interface/operation).. once received it will return the configured response and move on to the next step in your TestCase..

Hope this gets you started, please post again otherwise!

regards,

/Ole
eviware.com


Title: Re: Asynchronous Testing using soapUI pro
Post by: Tareque on November 12, 2007, 05:42:31 pm
Hi Ole,
I was able to test for an asynchronous SOAP request by following the steps mentioned.
Is it possible to just listen to an asynchronous http request
which has an XML as an attribute?
Thanks


Title: Re: Asynchronous Testing using soapUI pro
Post by: Tareque on November 12, 2007, 11:37:33 pm
Hi Ole,
Mock response works for requests that are generated from soapUI but when an asynchronous client creates a request and invokes the MockResponse service it gives an exception

Mon Nov 12 17:08:41 EST 2007:WARN:EXCEPTION
   javax.servlet.ServletException: com.eviware.soapui.impl.wsdl.mock.DispatchException: Missing operation for soapAction [""] and body element [{http://localhost:8000/ovm/WSDLGateway}processRequest] with SOAP Version [SOAP 1.1]
      at com.eviware.soapui.monitor.MockEngine$ServerHandler.handle(MockEngine.java:246)
      at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
      at org.mortbay.jetty.Server.handle(Server.java:313)
      at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
      at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:844)
      at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:644)
      at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
      at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
      at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:396)
      at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
   Caused by: com.eviware.soapui.impl.wsdl.mock.DispatchException: Missing operation for soapAction [""] and body element [{http://localhost:8000/ovm/WSDLGateway}processRequest] with SOAP Version [SOAP 1.1]
      at com.eviware.soapui.impl.wsdl.mock.WsdlMockRunner.dispatchRequest(WsdlMockRunner.java:50)
      at com.eviware.soapui.monitor.MockEngine$ServerHandler.handle(MockEngine.java:236)
      ... 9 more
Mon Nov 12 17:08:41 EST 2007:WARN:Nested in javax.servlet.ServletException: com.eviware.soapui.impl.wsdl.mock.DispatchException: Missing operation for soapAction [""] and body element [{http://localhost:8000/ovm/WSDLGateway}processRequest] with SOAP Version [SOAP 1.1]:
   com.eviware.soapui.impl.wsdl.mock.DispatchException: Missing operation for soapAction [""] and body element [{http://localhost:8000/ovm/WSDLGateway}processRequest] with SOAP Version [SOAP 1.1]
      at com.eviware.soapui.impl.wsdl.mock.WsdlMockRunner.dispatchRequest(WsdlMockRunner.java:259)
      at com.eviware.soapui.impl.wsdl.mock.WsdlMockRunner.dispatchRequest(WsdlMockRunner.java:50)
      at com.eviware.soapui.monitor.MockEngine$ServerHandler.handle(MockEngine.java:236)
      at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
      at org.mortbay.jetty.Server.handle(Server.java:313)
      at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
      at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:844)
      at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:644)
      at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
      at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
      at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:396)
      at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)




Title: Re: Asynchronous Testing using soapUI pro
Post by: omatzura on November 13, 2007, 02:52:53 am
Hi!

hmm.. hard to say.. can you send me the project-file so I can have a look if the external request seems to be ok (based on your log output)? (ole@eviware.com)

regards!

/Ole
eviware.com


Title: Re: Asynchronous Testing using soapUI pro
Post by: Tareque on November 16, 2007, 04:14:50 pm
Hi Ole,
We were able to resolve the issue. The problem was with our WSDL and not anything to do with soapUI.
Regards


Title: Re: Asynchronous Testing using soapUI pro
Post by: Szilárd Óvári on April 18, 2008, 12:03:30 pm
Hi Ole,

I'm fairly new to soapUI, but getting to like it very much.
Now I have the same problem Tareque had, and i can't find the answer here. I want to be able to capture a http post request which holds an xml but this xml is not built according to SOAP. So it is not a Web Service I am trying to emulate, but still would like to use soapUI, to have the entire communication during a transaction logged.
Is there a way i can do that?

Thank you in advance,
Szilárd
 


Title: Re: Asynchronous Testing using soapUI pro
Post by: omatzura on April 18, 2008, 01:38:20 pm
Hi Szilárd,

thanks for your interest! Unfortunately the soapUI mock engine currently requires a SOAP envelope to be able to dispatch your request, there is currently no way to get around this limitation.. sorry..

Please add a feature-request at sourceforge so we keep this in mind!

regards,

/Ole
eviware.com