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

6223Apache::SOAP and returning MIME attachments

Expand Messages
  • lormidorido
    Sep 5 5:17 PM
    • 0 Attachment
      Hi Paul and others on the list,

      I am sorry to bother you but having now been struggling for days with
      getting my SOAP::Lite server installation to return MIME attachment I
      see no other alternative then to resort to the mailing list.

      My problem is that I cannot understand how to specify to the
      Apache::SOAP server instance to use the package format

      Basically, I want to know how to setup the equivalence of the
      following code (that shows how to use attachments within the context
      of a CGI script):

      #!/usr/bin/perl -w
      use SOAP::Transport::HTTP;
      use MIME::Entity;
      => 'TemperatureService'})

      BEGIN {
      package TemperatureService;
      use vars qw(@ISA);
      @ISA = qw(Exporter SOAP::Server::Parameters);
      use SOAP::Lite;
      sub c2f {
      my $self = shift;
      my $envelope = pop;
      my $temp = $envelope->dataof("//c2f/temperature");
      use MIME::Entity;
      my $ent = build MIME::Entity
      Type => "text/plain",
      Path => "printenv",
      Filename => "printenv",
      Disposition => "attachment";
      # read

      foreach my $part (@{$envelope->parts}) {
      print STDERR "soaplite.cgi: attachment found! (".ref($part).")
      print STDERR "soaplite.cgi: contents => ".$part-
      # send

      return SOAP::Data->name('convertedTemp' => (((9/5)*($temp-
      >value)) + 32)),

      … within the context of using attachments with a SOAP::Lite setup
      using Apache::SOAP.

      I use location bases access in my httpd.conf file:
      <Location /ides_soap>
      SetHandler perl-script
      PerlHandler Apache::SOAP
      dispatch_to "IDES::new_matter,IDES::get_updated_matters,IDES::update_m
      PerlSetVar options "compress_threshold => 10000"


      Is it here that I somehow specify to Apache::SOAP to use the package
      format SOAP::Lite::Packager::MIME?

      Any help would be highly appreciated.

    • Show all 2 messages in this topic