Forum Discussion
What do you mean by "one time configuration using preferences"? I need to get this working in code, not the GUI.
The best solution would be to be able to decode the response, which is gzip. I have tried the following alternatives, but they all result in 'java.util.zip.ZipException: Not in GZIP format':
GZIPInputStream gis = new GZIPInputStream(new ByteArrayInputStream(((WsdlSinglePartHttpResponse) response).getRawResponseBody())); GZIPInputStream gis = new GZIPInputStream(new ByteArrayInputStream(response.getRawResponseData())); GZIPInputStream gis = new GZIPInputStream(new ByteArrayInputStream(response.getContentAsString().getBytes()));
Does anyone have code that either turns off the ability to accept compressed responses, or that can decompress a compressed response?
- hbjastad9 years agoContributor
nmrao, you keep pointing to the GUI. My question is about the API, not the GUI. I don't have any issues running accessing services from the GUI, but I struggle to decode the response from Java/Groovy code when using SoapUI as an API.
- nmrao9 years agoChampion Level 3
Any way here it is to change the settings
//Change value what is needed for you true or false boolean value = false; SoapUI.getSettings().setBoolean(HttpSettings.RESPONSE_COMPRESSION, value);
- hbjastad9 years agoContributor
Thank you, that was exactly the line of code I was looking for!
- nmrao9 years agoChampion Level 3
If you make the changes in the preferences, the settings are saved in the soapui-settings.xml file. If you use this settings file while executing(does not have to use UI, at least, you would know what change is required in xml if the preferences are change ), then you have do not have make any additional changes to handle this.
Related Content
- 5 years ago
Recent Discussions
- 3 hours ago
- 5 days ago