fkammermann
13 years agoNew Contributor
responseContent.size() vs rawResponseData.length
I try to figure out the size of the the soap response.
Like everytime soapUI provides me the the required tools.
But this time it provides me 2 tools and I don't know what's the meaning of the answers.
When I use
The answer is: 1466492
When I use
The answer is: 794207
I implemented also a SOAPHandler serverside, where I use the following code:
The result of this is: 793969
So what's the difference between
Like everytime soapUI provides me the the required tools.
But this time it provides me 2 tools and I don't know what's the meaning of the answers.
When I use
messageExchange.responseContent.size()
The answer is: 1466492
When I use
messageExchange.rawResponseData.length
The answer is: 794207
I implemented also a SOAPHandler serverside, where I use the following code:
SOAPMessage message = messageContext.getMessage();
CountingOutputStream countingOutputStream = new CountingOutputStream(new NullOutputStream());
try {
message.writeTo(countingOutputStream);
} catch (Exception e) {
throw new RuntimeException(e.toString());
}
long bytes = countingOutputStream.getByteCount();
String size = FileUtils.byteCountToDisplaySize(bytes);
LOG.info("the response size is: " + size);
The result of this is: 793969
So what's the difference between
messageExchange.responseContent.size()and
messageExchange.rawResponseData.length