I would not think that the error is related to the size.
The error points more into an issue with the building of the XML of the hash. Could it be the case that the directory contains a file with the same name and thus the building of the XML file fails?
I would suggest that you serialize the hash before using SOAP::Lite.
Have a look at this link for some further guideance
http://tardate.blogspot.com/2007/02/complex-soaplite-requests-my-rules-for.html