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

Re: SOAP::Lite 0.69

Expand Messages
  • sinnottj
    Hello, I ve been having the same problem - is there any work around for this? Is this problem likely to be fixed in the near future? I really ike SOAP::Lite as
    Message 1 of 2 , Jan 11, 2007
    • 0 Attachment
      Hello,

      I've been having the same problem - is there any work around for this? Is this problem
      likely to be fixed in the near future?

      I really ike SOAP::Lite as a fast and simple platform for developing web services; however
      this is a very serious limitation as far as I am concerned!

      Cheers,

      James.

      --- In soaplite@yahoogroups.com, "mmmbena1" <mmmbena1@...> wrote:
      >
      > Hi,
      >
      > We have been trying to make SOAP::Lite work for sending attachments to
      > and from servers, and we have pretty much made everything work
      > (including patching the code with the patch from sourceforge posted by
      > Joerg Prante on 2006-11-12). The only problem we are now left with, is
      > that our servers seem to include the request message's Content-Type
      > header in its responses. In any permutation of input/output including
      > attachments, this causes the response to be badly formed (either
      > because it has the wrong content type, or the wrong MIME boundary string).
      >
      > Does anyone else have this problem? In all cases that we have tried so
      > far, the response's Content-Type is simply a clone of the resquest's.
      >
      > Can anyone help?
      >
      > Yours
      > Dave Thorne
      >
      >
      >
      > ... Server code example ...
      >
      > #!/usr/bin/perl
      >
      > use strict;
      > use SOAP::Transport::HTTP;
      > use MIME::Entity;
      >
      > my $server = SOAP::Transport::HTTP::CGI ->
      > packager(SOAP::Packager::MIME->new) -> dispatch_to('runDSSP');
      > $server -> serializer -> autotype(0);
      > $server -> handle();
      >
      > BEGIN {
      >
      > use strict;
      > use vars qw(@ISA);
      > @ISA = qw(SOAP::Server::Parameters);
      >
      > sub runDSSP {
      >
      > my $self = shift;
      > my $envelope = pop; # SOM!!!
      >
      > # Create temporary file
      > my $rand = rand;
      > my $tmp_input = "/tmp/dssp-$rand.pdb";
      >
      > # Save PDB data to temporary file
      > open(INPUT, ">$tmp_input");
      > ${$envelope->parts}[0]->print(\*INPUT);
      > close(INPUT);
      >
      > # Execute DSSP
      > my $output = `/usr/local/bin/dsspcmbi -na $tmp_input`;
      >
      > my $ent = build MIME::Entity
      > 'Type' => "text/plain",
      > 'Data' => $output,
      > 'Filename' => "dssp.out",
      > 'Disposition' => "attachment";;
      >
      > # Delete temporary file
      > unlink $tmp_input;
      >
      > return $ent;
      > }
      >
      > }
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.