On Thu, 30 May 2002, ritun2000 wrote:
>Date: Thu, 30 May 2002 11:42:54 -0000
>From: ritun2000 <ritun2000@...>
>Subject: [soaplite] Re: Returning a file using SOAP::Lite
> Yes i did think of this option too. But it is a tedious way to do
>things, especially when i want to return multiple files.
>Further, I may also need to return binary files (gifs etc.)
I don't understand what point about it is tedious. Could you elaborate?
I find it quite easy to handle.
Perl strings can easily handle binary files, so I don't think that's
an issue, either. Just 'binmode()' the file handle if you're on a
non-unix platform and the string will be identical to the original file.
To handle mulitple files, I'd set one field to be an array reference,
and that array would contain all of the strings. Or, I might use a hash
ref and have the filename be the hash key.
I developed a distributed build system (based somewhat on Mozilla's
Tinderbox) that uses SOAP to pass 'build target' objects from a central
control server out to multiple build machine services. The object
contains fields with everything the build service needs to know about
where to find, checkout, and how to build the target software, and the
results (error codes, messages, logs, etc) all go into more fields on
the same object back to the controller. It works well and is brain-dead
simple to add more fields to. I didn't even have to write my own
transports or deserializers to do it, either.
Of course, my entire system is written in SOAP::Lite, no MS crap to talk
to and worry about.