Loading ...
Sorry, an error occurred while loading the content.

Re: Returning a file using SOAP::Lite

Expand Messages
  • ritun2000
    Hi Joi, 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
    Message 1 of 4 , May 30, 2002
    • 0 Attachment
      Hi Joi,

      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.)

      Regards,
      Ritu

      --- In soaplite@y..., Joi Ellis <gyles19@i...> wrote:
      > On Thu, 30 May 2002, ritun2000 wrote:
      >
      > >Date: Thu, 30 May 2002 10:40:52 -0000
      > >From: ritun2000 <ritun2000@y...>
      > >To: soaplite@y...
      > >Subject: [soaplite] Returning a file using SOAP::Lite
      > >
      > >Hello all,
      > >
      > > Is it possible to return a file using SOAP::Lite (0.55)??
      > >I am writing a function to accept certain parameters and create a file
      > >based on these parameters. Further, there are certain other related
      > >files too that i want to return with this file.
      > >So ultimately i may want to return one or more files depending upon
      > >the parameters.
      > >Any suggestions on how I can do that?
      > >
      > >Also is there a way to accept files using HTTP transport? I do know
      > >FTP transport already supports that.
      > >
      > >Awaiting response.
      >
      > I do it by reading the file into a string, and making the string
      > a field on an object. I also put the filename in another field on the
      > object, if necessary. Then I pass the object around. All of my stuff
      > is using HTTP tranport of one type or another.
      >
      > --
      > Joi Ellis
      > gyles19@n..., http://www.visi.com/~gyles19/
    • Joi Ellis
      ... 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
      Message 2 of 4 , May 30, 2002
      • 0 Attachment
        On Thu, 30 May 2002, ritun2000 wrote:

        >Date: Thu, 30 May 2002 11:42:54 -0000
        >From: ritun2000 <ritun2000@...>
        >To: soaplite@yahoogroups.com
        >Subject: [soaplite] Re: Returning a file using SOAP::Lite
        >
        >Hi Joi,
        >
        > 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.


        --
        Joi Ellis
        gyles19@..., http://www.visi.com/~gyles19/
      Your message has been successfully submitted and would be delivered to recipients shortly.