I'm not familiar with SOAP, so forgive me if this doesn't apply to your situation.
I had to solve this problem not too long ago for a personal project of mine, where I dynamically generated and streamed large ZIPs to the user. My solution was to precompute the size of the object by generating it once and recording its size. The drawback to this solution is that the size needs to be recomputed if the contents of the object change, but if you have a finite number of objects whose sizes don't change often, it might work for you.
The code I used looks something like this:
ob_start();
$zip_length = 0;
$zip = new ZipStream();
foreach ($files as $virtual_path => $file_path) {
$zip->add_file_from_path($virtual_path, $file_path);
$zip_length += strlen(ob_get_contents());
ob_clean(); /* prevent excessive memory usage */
}
$zip->finish();
$zip_length += strlen(ob_get_contents());
ob_end_clean();
/* Store $zip_length somewhere */
If this is too general for your purposes, perhaps consider specifying what "objects" you're sending to the user.