|
Title: SoapUIMockServiceRunner Post by: k080513 on May 13, 2008, 10:47:32 pm Hello,
I have created a soupui project containing a mock service with a mock response. There is also a test suite which calls the mock service. I have started mock service and sent a request to it and it all worked fine. However I want to do this programmatically in a unit test to get this included in a maven 2 build. So I use a SoapUIMockServiceRunner object which is configured with the soapui project file. It works fine to start this from code, the log output is exactly the same as when using mockservicerunner.bat. Then I want to use SoapUITestCaseRunner (configured with the same project file) to send a request to the mock service. This works when I run the test inside soapUI but causing an error when running the code. This is what is printed in soapui.log when this error occurs: 2008-05-13 22:54:22,442 INFO [WsdlProject] Loaded project from [file:/C:/temp/test-soapui-project.xml] 2008-05-13 22:54:22,442 INFO [SoapUITestCaseRunner] Running soapUI tests in project [testMock] 2008-05-13 22:54:22,458 INFO [SoapUITestCaseRunner] Running soapUI suite [TestSuite 1], runType = SEQUENTIAL 2008-05-13 22:54:22,458 INFO [SoapUITestCaseRunner] Running soapUI testcase [TestCase 1] 2008-05-13 22:54:22,458 INFO [SoapUITestCaseRunner] running step [Test Request] 2008-05-13 22:54:23,364 INFO [HttpClientSupport$Helper] Initializing SSL 2008-05-13 22:54:23,552 WARN [jetty] EXCEPTION java.lang.NoSuchMethodError: javax.wsdl.Definition.getAllServices()Ljava/util/Map; at com.eviware.soapui.impl.wsdl.support.wsdl.WsdlUtils.findBindingForOperation(WsdlUtils.java:142) at com.eviware.soapui.impl.wsdl.support.wsdl.WsdlUtils.isRpc(WsdlUtils.java:282) From the test-report: Response Headers: {Connection=close, #status#=HTTP/1.1 500 Internal Server Error, Server=Jetty(6.1.5)} at com.eviware.soapui.tools.SoapUITestCaseRunner.throwFailureException(SoapUITestCaseRunner.java:377) at com.eviware.soapui.tools.SoapUITestCaseRunner.runRunner(SoapUITestCaseRunner.java:345) at com.eviware.soapui.tools.AbstractSoapUIRunner.run(AbstractSoapUIRunner.java:114) If anybody has any idea about what might be wrong or any code examples that would be interesteing. best regards. Title: Re: SoapUIMockServiceRunner Post by: omatzura on May 13, 2008, 11:00:32 pm Hi!
it looks like you have an older version of the wsdl4j jar file first in your classpath (before the soapUI one..) regards! /Ole eviware.com Title: Re: SoapUIMockServiceRunner Post by: k080513 on May 14, 2008, 08:33:29 am Thanks for your reply.
In my project I use the maven soupui plugin: <dependency> <groupId>eviware</groupId> <artifactId>maven-soapui-plugin</artifactId> <version>2.0.2</version> <scope>test</scope> </dependency> wsdl4j is a transitive dependency. The wsdl4j is version 1.6.2-fixed. That is the same as in mockservicerunner.bat. Thanks. Title: Re: SoapUIMockServiceRunner Post by: omatzura on May 15, 2008, 01:59:34 pm Hi!
ok.. could there be some other plugin that has an older/other wsdl4j dependency? regards, /Ole eviware.com |