I have springboot webservices (running on jboss) that return json data where content-encoding is gzip. I can hit the service via browser, using the url and it displays all the json data as expected. When I run a Kat test ustilizing WS.sendRequest, the following error is shown in the console:
org.apache.http.ConnectionClosedException: Premature end of Content-Length delimited
message body (expected: 91834; received: 13653
at org.apache.http.util.EntityUtils.toString(EntityUtils.java …
As a side note, the services on the backend were just converted to springboot and were previously using resteasy implementation. This test ran fine with that. But the response in the browser is fine with all the proper headers, so I don’t see why Katalon is having a problem getting the data from the endpoint, no errors server side. Running studio version 8.4.1. Any ideas on things to try? The response isn’t that large as you can see from the numbers above. I’m not sure how to even debug this from the Katalon side.
I know that’s not entirely true. These services were successfully tested for some time using Katalon tests (aka WS.sendRequest) with Content-Encoding: gzip before they were converted to utilize the springboot framework. The tests ran fine when the services used the RestEasy framework and they were gzip then. This made me believe it was something on the server side where possibly springboot was sending different header information. Unless someone can tell me officially that Katalon does not support gzip encoded services.
If I were you, I would read the StackTrace messages (which you trimmed short) from top to bottom and find out “Root cause” section. In the “Root cause” section, you will find out which class of com.kms.katalon.core.* & which line of the *.java file raised the Exception.
Once you identified the exact location where the Exception was raised, I will look at the source code of Katalon Studio. You can find the source at
Then I would study the source of Katalon class, try to understad how it behaves. You would be able to develop a mimic of the faulty Katalon class (which drives Apache Http Client library). You would be able to test your mimic against the URL of your Application Under Test. Thus you might be able to reproduce the “ConnectionClosedException” issue. Once you could reproduce the insident, it would be 100% clear to you what was the root cause of the exception.
I am afraid, the Katalon developers seem to be un-keen on developing WS features these days. They seem to be busy developing the “Katalon Platform”. I do not think that your post concerning WS will be addressed by them. Your effort may go wasted.
It would be easier if you choose other tools for Web Service testing …