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
      ->uri($namespace)
      ->parts([ $ent ])
      ->proxy($uriLoc)
      ->SendBinData(SOAP::Data->name("foo" => "bar"));
      ___________________________________________________

      and my server code:
      ___________________________________________________

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

      SOAP::Transport::HTTP::CGI
      -> 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).")
      \n";
      }
      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
      error:
      -------------------------------------------------
      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-Peer: 24.2.70.225:80
      Client-Response-Num: 1
      SOAPServer: SOAP::Lite/Perl/0.65

      <?xml version="1.0" encoding="UTF-8"?><soap:Envelope
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

      <soap:Body>
      <soap:Fault>
      <faultcode>soap:Client</faultcode>
      <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.
      </faultstring>
      </soap:Fault>
      </soap:Body>
      </soap:Envelope>
      __________________________________________
      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!

      -Will
    • Show all 2 messages in this topic