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

Win32, Perl 5.8 problems.

Expand Messages
  • alien_life_4mus
    Greetings. I am testing SOAP::Lite (0.55) on a win32 box wih perl5.8/Apache 2.0.40. I have two different sets of problems. Problem the First: (The test package
    Message 1 of 1 , Sep 16, 2002
    View Source
    • 0 Attachment
      Greetings.

      I am testing SOAP::Lite (0.55) on a win32 box wih perl5.8/Apache
      2.0.40.

      I have two different sets of problems.

      Problem the First:

      (The test package code, though mostly irrelevant - I think - to
      my issue can be found below).

      This is the client code:
      <code>

      use SOAP::Lite +trace=>qw(debug);
      my $soapbar=SOAP::Lite
      ->uri('http://nbdell7/SUM')
      ->proxy('http://nbdell7/cgi-bin/foo-soap.cgi')
      ;
      my $barman=$soapbar->call('new'=>($lower,$upper))->result;
      print STDOUT "$lower to $upper: ",$soapbar->sum($barman)->result
      (),"\n";

      </code>


      Under Apache/CGI I see the expected result if I insert the package
      in the server:

      <code>
      use SOAP::Lite +trace=>qw(headers transport);
      use SOAP::Transport::HTTP;

      SOAP::Transport::HTTP::CGI
      ->dispatch_to('SUM')
      ->handle;

      package SUM;
      # [...]

      </code>


      If I try dynamic dispatching, thusly:

      <code>
      # server
      SOAP::Transport::HTTP::CGI
      -> dispatch_to('D:/home/alf/job/dotnet/dispatch');
      -> options({compress_threshold => 10000})
      -> handle
      </code>

      The call to new() succeeds (and I can see the object being correctly
      marshaled between calls), however the call to sum fails with:

      <pre>
      Denied access to method (sum) in class (SUM) at
      D:/think3/perl/site/lib/SOAP/Lite.pm line 2128.
      </pre>


      If I try the slightly modified:

      <code>
      # server
      SOAP::Transport::HTTP::CGI
      -> dispatch_to('D:/home/alf/job/dotnet/dispatch');
      -> options({compress_threshold => 10000})
      -> handle
      </code>

      I get similar behaviour except the diagnostic is now:

      <pre>
      Failed to locate method (sum) in class (SUM) at
      D:/think3/perl/site/lib/SOAP/Lite.pm line 2195.
      </pre>

      Basically, the only way to get around the problem is to use lib();
      use SUM;, i.e. switch to completely static dispatching.


      Problem the second:

      If I use HTTP::Daemon instead of Apache, everything unravels from
      the first call to new - the entire request is discarded (and sent
      back in a Client-junk header). So it seems this is happening for
      reasons unrelated to the first problem (though puzzling: UTF8 issues?
      If I redirect the transport output to file I see raw carriage return
      sequences: the same does not happen with the apache version).



      As I remember, most of this stuff used to work under perl 5.6/apache
      1.3

      TIA & cheers
      alf



      <code>
      package SUM;

      sub new {
      my ($pkg,$l,$u)=@_;
      my $self={};
      $self->{L}=$l if defined $l;
      $self->{U}=$u if defined $u;
      return bless $self, $pkg;
      }

      sub sum {
      #print STDERR 'Arguments: ',join(' ',@_),"\n";
      my $pkg=shift;
      my $result=0;
      if (!@_ && ref($pkg)) {
      @_=($pkg->{L}..$pkg->{U});
      }
      $result += $_ for @_;
      $result;
      }

      1;

      </code>
    Your message has been successfully submitted and would be delivered to recipients shortly.