I've spent a good deal of time not too long ago to try to work around problems like this. I've finally had given up on trying to use SOAP for two reasons: SOAP::Lite is quite complex and dated, it might be hard to use and hard to debug. This coupled with the type agnosticism of Perl makes for a suboptimal SOAP client/server (can't easily autogenerate WSDL).
I've even written my own WSDL definition file, read the specifications for both SOAP and WSDL, but basically what that experience has taught me is that either you're willing to learn these specifications in detail, and you have willingness to implement a SOAP module on top of / instead of SOAP::Lite, you're going to run into issues like the ones you're experiencing.
Now, your problem can be worked around, but that's by getting into SOAP::Lite internals (the module is a bit weird to make an understatement, so internals is a weird word for this as the module doesn't really have a clear boundary between internal/external methods), possibly using
SOAP::SOM and
SOAP::Data (they are both part of the SOAP module on CPAN).
Documentation is a scarce thing, apart from the SOAP and WSDL specifications you can find some information on
http://www.soaplite.com/. The archives contain quite a lot of solutions for issues similar to these, but sadly they appear to be the only hint on how to solve more complex problems. Also, you might find the
cookbook helpful, or the
guide, but they are both unfinished.
Avoid SOAP and SOAP::Lite if you can (like I did), as it's very very hard to make it work in case you're interoperating with different, non SOAP::Lite clients. If you can't, you need to read the specifications, and possibly after going through the scarce documentation available, after digging through the sometimes cryptic SOAP::Lite source at places, then you can possibly make it work.