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

Re: Sending file attachments

Expand Messages
  • staindtd@yahoo.com
    Hi Thanks Paul for all the information. So if I want to send a file I need to use base 64. I m still a little confused about how the file is being sent? Is it
    Message 1 of 6 , Aug 8, 2001
    View Source
    • 0 Attachment
      Hi
      Thanks Paul for all the information. So if I want to send a file I
      need to use base 64. I'm still a little confused about how the file
      is being sent? Is it being sent as an attachment? Or are me just
      sending the bytes? If you could help me would with some information
      and possibly a simple example I would really appreciate it.
      Thanks

      Victor



      --- In soaplite@y..., Paul Kulchenko <paulclinger@y...> wrote:
      > --- staindtd@y... wrote:
      > > it. But what I wanted to do was to have my server program send
      > > files
      > > to the client, and client to server. I keep looking on line for
      > If you just need to send files here and there you can use base64
      > encoded elements (at least it's what I'm doing).
      >
      > > information on how to do this but can't find any good
      explanations.
      > > I
      > > have read some stuff on attaching messages. And have also read
      some
      > > things on MIME. I was wondering if any one could help me with an
      > > explanation and an example.
      > SOAP::Lite supports MIME messages only on parsing side and doesn't
      > not create them right now. There are only a few toolkits available
      > that support that, so if you want to be interoperable your best bet
      > is still base64. Even if there will be more than one toolkit
      > available there was no interop tests between MIME transfers yet, and
      > though I'm pretty sure I did everything according to spec, my
      reading
      > can be different from someone's else (and from authors also).
      >
      > At the same time I'm working on MIME generation also and future
      > versions of SOAP::Lite may support it.
      >
      > Best wishes, Paul.
      >
      > --- staindtd@y... wrote:
      > > Hi
      > >
      > > Sorry if this is an easy question, I searched through the
      archives.
      > >
      > > But I was looking for a more simple explanation. I have been
      > > working
      > > with soap::lite for a few weeks now and I understand the basics
      of
      > > it. But what I wanted to do was to have my server program send
      > > files
      > > to the client, and client to server. I keep looking on line for
      > > information on how to do this but can't find any good
      explanations.
      > > I
      > > have read some stuff on attaching messages. And have also read
      some
      > >
      > > things on MIME. I was wondering if any one could help me with an
      > > explanation and an example.
      > >
      > > Thanks for the help
      > >
      > >
      > >
      > > ------------------------ Yahoo! Groups Sponsor
      > >
      > > To unsubscribe from this group, send an email to:
      > > soaplite-unsubscribe@y...
      > >
      > >
      > >
      > > Your use of Yahoo! Groups is subject to
      > > http://docs.yahoo.com/info/terms/
      > >
      > >
      >
      >
      > __________________________________________________
      > Do You Yahoo!?
      > Make international calls for as low as $.04/minute with Yahoo!
      Messenger
      > http://phonecard.yahoo.com/
    • Paul Kulchenko
      Hi, Victor! ... Yes, we re sending bytes: [client] # get file open(F,
      Message 2 of 6 , Aug 8, 2001
      View Source
      • 0 Attachment
        Hi, Victor!

        > need to use base 64. I'm still a little confused about how the file
        > is being sent? Is it being sent as an attachment? Or are me just
        > sending the bytes? If you could help me would with some information
        > and possibly a simple example I would really appreciate it.
        Yes, we're sending bytes:

        [client]

        # get file
        open(F, "<$myfile") or die "$myfile: $!";
        my $file = join '', <F>;
        close(F) or die "$myfile: $!";

        # make SOAP call
        my $result = SOAP::Lite->proxy(...)->uri(...)
        ->sendFile(SOAP::Data->type(base64 => $file));

        die "Doesn't work: ", $result->faultstring if $result->fault;

        [server]

        sub sendFile {
        my($class, $file) = @_;
        # content of your file is in $file
        # if you'd like to save it and you're on Windows platform,
        # don't forget to use binmode()
        }

        Best wishes, Paul.

        --- staindtd@... wrote:
        > Hi
        > Thanks Paul for all the information. So if I want to send a file I
        > need to use base 64. I'm still a little confused about how the file
        > is being sent? Is it being sent as an attachment? Or are me just
        > sending the bytes? If you could help me would with some information
        >
        > and possibly a simple example I would really appreciate it.
        > Thanks
        >
        > Victor
        >
        >
        >
        > --- In soaplite@y..., Paul Kulchenko <paulclinger@y...> wrote:
        > > --- staindtd@y... wrote:
        > > > it. But what I wanted to do was to have my server program send
        > > > files
        > > > to the client, and client to server. I keep looking on line for
        >
        > > If you just need to send files here and there you can use base64
        > > encoded elements (at least it's what I'm doing).
        > >
        > > > information on how to do this but can't find any good
        > explanations.
        > > > I
        > > > have read some stuff on attaching messages. And have also read
        > some
        > > > things on MIME. I was wondering if any one could help me with
        > an
        > > > explanation and an example.
        > > SOAP::Lite supports MIME messages only on parsing side and
        > doesn't
        > > not create them right now. There are only a few toolkits
        > available
        > > that support that, so if you want to be interoperable your best
        > bet
        > > is still base64. Even if there will be more than one toolkit
        > > available there was no interop tests between MIME transfers yet,
        > and
        > > though I'm pretty sure I did everything according to spec, my
        > reading
        > > can be different from someone's else (and from authors also).
        > >
        > > At the same time I'm working on MIME generation also and future
        > > versions of SOAP::Lite may support it.
        > >
        > > Best wishes, Paul.
        > >
        > > --- staindtd@y... wrote:
        > > > Hi
        > > >
        > > > Sorry if this is an easy question, I searched through the
        > archives.
        > > >
        > > > But I was looking for a more simple explanation. I have been
        > > > working
        > > > with soap::lite for a few weeks now and I understand the basics
        >
        > of
        > > > it. But what I wanted to do was to have my server program send
        > > > files
        > > > to the client, and client to server. I keep looking on line for
        >
        > > > information on how to do this but can't find any good
        > explanations.
        > > > I
        > > > have read some stuff on attaching messages. And have also read
        > some
        > > >
        > > > things on MIME. I was wondering if any one could help me with
        > an
        > > > explanation and an example.
        > > >
        > > > Thanks for the help
        > > >
        > > >
        > > >
        > > > ------------------------ Yahoo! Groups Sponsor
        > > >
        > > > To unsubscribe from this group, send an email to:
        > > > soaplite-unsubscribe@y...
        > > >
        > > >
        > > >
        > > > Your use of Yahoo! Groups is subject to
        > > > http://docs.yahoo.com/info/terms/
        > > >
        > > >
        > >
        > >
        > > __________________________________________________
        > > Do You Yahoo!?
        > > Make international calls for as low as $.04/minute with Yahoo!
        > Messenger
        > > http://phonecard.yahoo.com/
        >
        >
        > ------------------------ Yahoo! Groups Sponsor
        >
        > To unsubscribe from this group, send an email to:
        > soaplite-unsubscribe@yahoogroups.com
        >
        >
        >
        > Your use of Yahoo! Groups is subject to
        > http://docs.yahoo.com/info/terms/
        >
        >


        __________________________________________________
        Do You Yahoo!?
        Make international calls for as low as $.04/minute with Yahoo! Messenger
        http://phonecard.yahoo.com/
      • jackx888@yahoo.com
        So does that mean there is not a way to generate a SOAP rpc call with attachments in accordance to w3c spec http://www.w3.org/TR/SOAP-attachments
        Message 3 of 6 , Aug 14, 2001
        View Source
        • 0 Attachment
          So does that mean there is not a way to generate a SOAP rpc call with
          attachments in accordance to w3c spec
          http://www.w3.org/TR/SOAP-attachments
          programmatically using SOAP::Lite?

          I am working with an apache soap service that expects file attachment
          in such format. I realize i can easily send the post request through
          standard HTTP connections, since the file is the only variable. But
          that means I have to parse the response manually. Or can I call
          deserializer on the response?

          Thanks.

          -jack

          --- In soaplite@y..., Paul Kulchenko <paulclinger@y...> wrote:
          > --- staindtd@y... wrote:
          > > it. But what I wanted to do was to have my server program send
          > > files
          > > to the client, and client to server. I keep looking on line for
          > If you just need to send files here and there you can use base64
          > encoded elements (at least it's what I'm doing).
          >
          > > information on how to do this but can't find any good
          explanations.
          > > I
          > > have read some stuff on attaching messages. And have also read
          some
          > > things on MIME. I was wondering if any one could help me with an
          > > explanation and an example.
          > SOAP::Lite supports MIME messages only on parsing side and doesn't
          > not create them right now. There are only a few toolkits available
          > that support that, so if you want to be interoperable your best bet
          > is still base64. Even if there will be more than one toolkit
          > available there was no interop tests between MIME transfers yet, and
          > though I'm pretty sure I did everything according to spec, my
          reading
          > can be different from someone's else (and from authors also).
          >
          > At the same time I'm working on MIME generation also and future
          > versions of SOAP::Lite may support it.
          >
          > Best wishes, Paul.
          >
          > --- staindtd@y... wrote:
          > > Hi
          > >
          > > Sorry if this is an easy question, I searched through the
          archives.
          > >
          > > But I was looking for a more simple explanation. I have been
          > > working
          > > with soap::lite for a few weeks now and I understand the basics
          of
          > > it. But what I wanted to do was to have my server program send
          > > files
          > > to the client, and client to server. I keep looking on line for
          > > information on how to do this but can't find any good
          explanations.
          > > I
          > > have read some stuff on attaching messages. And have also read
          some
          > >
          > > things on MIME. I was wondering if any one could help me with an
          > > explanation and an example.
          > >
          > > Thanks for the help
          > >
          > >
          > >
          > > ------------------------ Yahoo! Groups Sponsor
          > >
          > > To unsubscribe from this group, send an email to:
          > > soaplite-unsubscribe@y...
          > >
          > >
          > >
          > > Your use of Yahoo! Groups is subject to
          > > http://docs.yahoo.com/info/terms/
          > >
          > >
          >
          >
          > __________________________________________________
          > Do You Yahoo!?
          > Make international calls for as low as $.04/minute with Yahoo!
          Messenger
          > http://phonecard.yahoo.com/
        • Paul Kulchenko
          Hi, Jack! Yes, there is no way to generate attachments right now, but you shouldn t have any problems accepting those though. SOAP generation is on my todo
          Message 4 of 6 , Aug 14, 2001
          View Source
          • 0 Attachment
            Hi, Jack!

            Yes, there is no way to generate attachments right now, but you
            shouldn't have any problems accepting those though. SOAP generation
            is on my todo list, but it's not a top priority (although it's in top
            ten).

            > But
            > that means I have to parse the response manually. Or can I call
            > deserializer on the response?
            You don't need to do anything special with responses. You get
            attachments as element values:

            <a href="cid:claim061400a.tiff@..."/>

            --MIME_boundary
            Content-ID: <claim061400a.tiff@...>

            123

            element <a> will have value 123 after processing. some required MIME
            headers are skipped. You may take a look into t/04-attach.t for more
            information.

            Best wishes, Paul.

            --- jackx888@... wrote:
            > So does that mean there is not a way to generate a SOAP rpc call
            > with
            > attachments in accordance to w3c spec
            > http://www.w3.org/TR/SOAP-attachments
            > programmatically using SOAP::Lite?
            >
            > I am working with an apache soap service that expects file
            > attachment
            > in such format. I realize i can easily send the post request
            > through
            > standard HTTP connections, since the file is the only variable.
            > But
            > that means I have to parse the response manually. Or can I call
            > deserializer on the response?
            >
            > Thanks.
            >
            > -jack
            >
            > --- In soaplite@y..., Paul Kulchenko <paulclinger@y...> wrote:
            > > --- staindtd@y... wrote:
            > > > it. But what I wanted to do was to have my server program send
            > > > files
            > > > to the client, and client to server. I keep looking on line for
            >
            > > If you just need to send files here and there you can use base64
            > > encoded elements (at least it's what I'm doing).
            > >
            > > > information on how to do this but can't find any good
            > explanations.
            > > > I
            > > > have read some stuff on attaching messages. And have also read
            > some
            > > > things on MIME. I was wondering if any one could help me with
            > an
            > > > explanation and an example.
            > > SOAP::Lite supports MIME messages only on parsing side and
            > doesn't
            > > not create them right now. There are only a few toolkits
            > available
            > > that support that, so if you want to be interoperable your best
            > bet
            > > is still base64. Even if there will be more than one toolkit
            > > available there was no interop tests between MIME transfers yet,
            > and
            > > though I'm pretty sure I did everything according to spec, my
            > reading
            > > can be different from someone's else (and from authors also).
            > >
            > > At the same time I'm working on MIME generation also and future
            > > versions of SOAP::Lite may support it.
            > >
            > > Best wishes, Paul.
            > >
            > > --- staindtd@y... wrote:
            > > > Hi
            > > >
            > > > Sorry if this is an easy question, I searched through the
            > archives.
            > > >
            > > > But I was looking for a more simple explanation. I have been
            > > > working
            > > > with soap::lite for a few weeks now and I understand the basics
            >
            > of
            > > > it. But what I wanted to do was to have my server program send
            > > > files
            > > > to the client, and client to server. I keep looking on line for
            >
            > > > information on how to do this but can't find any good
            > explanations.
            > > > I
            > > > have read some stuff on attaching messages. And have also read
            > some
            > > >
            > > > things on MIME. I was wondering if any one could help me with
            > an
            > > > explanation and an example.
            > > >
            > > > Thanks for the help
            > > >
            > > >
            > > >
            > > > ------------------------ Yahoo! Groups Sponsor
            > > >
            > > > To unsubscribe from this group, send an email to:
            > > > soaplite-unsubscribe@y...
            > > >
            > > >
            > > >
            > > > Your use of Yahoo! Groups is subject to
            > > > http://docs.yahoo.com/info/terms/
            > > >
            > > >
            > >
            > >
            > > __________________________________________________
            > > Do You Yahoo!?
            > > Make international calls for as low as $.04/minute with Yahoo!
            > Messenger
            > > http://phonecard.yahoo.com/
            >
            >
            > To unsubscribe from this group, send an email to:
            > soaplite-unsubscribe@yahoogroups.com
            >
            >
            >
            > Your use of Yahoo! Groups is subject to
            > http://docs.yahoo.com/info/terms/
            >
            >


            __________________________________________________
            Do You Yahoo!?
            Make international calls for as low as $.04/minute with Yahoo! Messenger
            http://phonecard.yahoo.com/
          Your message has been successfully submitted and would be delivered to recipients shortly.