Here is a patch against SoapSampler.java to properly calculate the content length on the post submission.
Created attachment 18480 [details] patch to enable calculation of content length in soap sampler
Thanks for the patch. Sorry it has taken so long to get round to it. There is a slight problem with using File().length() - on some platforms it may return a different value from counting the data bytes in the file. E.g. on OpenVMS it returns a larger number for text files. [This is because VMS normally uses variable length records for these, and the record size prefix is included in the file size] I've updated the code to use the Content-Length header if present: -1 = use chunked 0 or missing = use File.length else = use the header value as the length This should cover all possibilities... It will be in the next nightly build at: http://people.apache.org/builds/jakarta-jmeter/nightly/ Note: the Content-Length should not be added by the user, so I've suppressed it in the underlying HttpClient sampler.
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/1750