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

4139MIME::Parser: can't flush:

Expand Messages
  • Will Fawcett
    Oct 31, 2004
    • 0 Attachment
      I am trying a very basic soap attachment, I am sending a GIF image.
      I am currently on SoapLite ver .65 for the server and client. my
      client code is almost exactly what the example looks like

      my $ent = build MIME::Entity
      Type => "image/gif",
      Encoding => "base64",
      Path => "title.gif",
      Filename => "title.gif",
      Disposition => "attachment";

      my $som = SOAP::Lite
      ->parts([ $ent ])
      ->SendBinData(SOAP::Data->name("foo" => "bar"));

      and my server code:

      #!/usr/bin/perl -w
      use SOAP::Transport::HTTP;

      -> dispatch_to('lifestyle')
      -> handle;

      package lifestyle;
      use SOAP::Lite;
      use MIME::Entity;
      use vars qw(@ISA);
      @ISA= qw(SOAP::Server::Parameters);

      sub SendBinData{
      my $self = shift;
      my $envelope = pop;
      foreach my $part (@{$envelope->parts}) {
      print "AttachmentService: attachment found! (".ref($part).")
      open(LOG,"logfile.txt") or die;
      print LOG "Entered the correct Subroutine\n";

      I don't know why but it just is not working, I keep getting the
      SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 500 Internal
      Server Error
      Connection: close
      Date: Sun, 31 Oct 2004 21:55:56 GMT
      Server: Apache/2.0.40 (Red Hat Linux)
      Content-Length: 627
      Content-Type: text/xml; charset=utf-8
      Client-Date: Sun, 31 Oct 2004 22:03:55 GMT
      Client-Response-Num: 1
      SOAPServer: SOAP::Lite/Perl/0.65

      <?xml version="1.0" encoding="UTF-8"?><soap:Envelope

      <faultstring>Application failed during request deserialization:
      Something wrong with MIME message: MIME::Parser: can't flush:
      at /usr/lib/perl5/site_perl/5.8.0/MIME/Parser.pm line 789.
      I have uninstalled and reinstalled the Mime::Tools and SoapLite
      v0.65 and still the same issue. It appears to be sending the file
      because I see the Base64 lines when I watch the soap message.
      As you can see, my server code is not even attempting to catch the
      message any more, it is just trying to write a file, and I can't
      even get that. Is the issue my code, or a bug, or a bad install? I
      am so very lost!

    • Show all 2 messages in this topic