Forum Discussion

spartanhooah's avatar
spartanhooah
Occasional Contributor
8 years ago

Getting 500 when running a test step from Java

I have a test suite with one test case which has three test steps. I can run the first test step from SoapUI just fine, but when I load the project from a Java class, I see debug messages with an HTTP 500 and a strange connection IP. Then there's an IOException. Here's my code:

 

WsdlProject project = new WsdlProject("Resources/SOAPService-soapui-project.xml");
WsdlTestCase testCase = project.getTestSuiteByName("TestSuite 1").getTestCaseByName("TestCase 1");
WsdlTestStep driver = testCase.getTestStepByName("Driver");

StringToObjectMap properties = new StringToObjectMap();
properties.put("requestBody", null);
properties.put("expectedVendorCode", null);
properties.put("expectedInternalCode", null);
properties.put("currentTime", null);
WsdlTestCaseRunner runner = new WsdlTestCaseRunner(testCase, properties);
runner.runTestStep(driver);

 

Here's the log and stack trace:

[HttpClientSupport$SoapUIHttpClient] Attempt 1 to execute request
[SoapUIMultiThreadedHttpConnectionManager$SoapUIDefaultClientConnection] Sending request: POST /web_services/services/specific_service HTTP/1.1
[SoapUIMultiThreadedHttpConnectionManager$SoapUIDefaultClientConnection] Receiving response: HTTP/1.1 500 Internal Server Error
[SoapUIMultiThreadedHttpConnectionManager$SoapUIDefaultClientConnection] Connection 0.0.0.0:65124<->216.58.218.206:80 shut down
[SoapUIMultiThreadedHttpConnectionManager$SoapUIDefaultClientConnection] Connection 0.0.0.0:65124<->216.58.218.206:80 closed
java.io.IOException: Decompression of response failed
at com.eviware.soapui.impl.wsdl.submit.transports.http.HttpMethodSupport.getResponseBody(HttpMethodSupport.java:321)
at com.eviware.soapui.impl.wsdl.submit.transports.http.support.methods.ExtendedPostMethod.getResponseBody(ExtendedPostMethod.java:133)
at com.eviware.soapui.impl.wsdl.submit.transports.http.BaseHttpResponse.<init>(BaseHttpResponse.java:92)
at com.eviware.soapui.impl.wsdl.submit.transports.http.SinglePartHttpResponse.<init>(SinglePartHttpResponse.java:46)
at com.eviware.soapui.impl.wsdl.submit.transports.http.support.attachments.WsdlSinglePartHttpResponse.<init>(WsdlSinglePartHttpResponse.java:40)
at com.eviware.soapui.impl.wsdl.submit.filters.HttpPackagingResponseFilter.wsdlRequest(HttpPackagingResponseFilter.java:75)
at com.eviware.soapui.impl.wsdl.submit.filters.HttpPackagingResponseFilter.afterAbstractHttpResponse(HttpPackagingResponseFilter.java:52)
at com.eviware.soapui.impl.wsdl.submit.filters.AbstractRequestFilter.afterRequest(AbstractRequestFilter.java:68)
at com.eviware.soapui.impl.wsdl.submit.transports.http.HttpClientRequestTransport.sendRequest(HttpClientRequestTransport.java:295)
at com.eviware.soapui.impl.wsdl.WsdlSubmit.run(WsdlSubmit.java:127)
at com.eviware.soapui.impl.wsdl.WsdlSubmit.submitRequest(WsdlSubmit.java:80)
at com.eviware.soapui.impl.wsdl.WsdlRequest.submit(WsdlRequest.java:242)
at com.eviware.soapui.impl.wsdl.teststeps.WsdlTestRequestStep.run(WsdlTestRequestStep.java:419)
at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.runTestStep(AbstractTestCaseRunner.java:239)
at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.runTestStepByName(AbstractTestCaseRunner.java:224)
at com.eviware.soapui.model.testsuite.TestCaseRunner$runTestStepByName.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
at Script1.run(Script1.groovy:11)
at com.eviware.soapui.support.scripting.groovy.SoapUIGroovyScriptEngine.run(SoapUIGroovyScriptEngine.java:100)
at com.eviware.soapui.impl.wsdl.teststeps.WsdlGroovyScriptTestStep.run(WsdlGroovyScriptTestStep.java:154)
at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.runTestStep(AbstractTestCaseRunner.java:239)
at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.runTestStep(AbstractTestCaseRunner.java:229)
at futzing.SoapUIRunner.main(SoapUIRunner.java:32)

What am I missing in the setup?

 

No RepliesBe the first to reply