Problem solved, thanks very much Daniel ...
We have Moodle v2.3.8 and Webwork v2.7 working together after appending the following line to the file "/etc/apache2/envvars" on an Ubuntu 12.04.2 64-bit server (from the Webwork Vanilla_Live distribution at the webwork.maa.org web site):
export MOD_PERL_API_VERSION=2
This solves the "SOAP - The LENGTH argument can't be negative" problem noted above, as you would guess from looking at the code.
We could not get Moodle v2.5.1+ to work with Webwork v2.7.