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

282Re: [soaplite] One More Question

Expand Messages
  • Sean.Meisner@VerizonWireless.com
    May 3, 2001
      Hi Craig,

      The "use" statement gets executed at compile time, before perl attempts
      to run the rest of the script, so $uri and $proxy in this code snippet are
      undefined when you try to "use SOAP::Lite ... " . Try putting the "use
      line into a string, and then eval() it, to force a delay of execution until
      after $uri
      and $proxy contain meaningful values.



      Craig Kelley <kellcrai@...> on 05/02/2001 11:46:02 PM

      Please respond to soaplite@yahoogroups.com

      To: soaplite@yahoogroups.com
      cc: (bcc: Sean Meisner/Great Lakes/AirTouch)
      bcc: Sean Meisner/Great Lakes/AirTouch

      Subject: [soaplite] One More Question

      Hello Again,

      I have my code working fine, but I was wondering why this specific example
      is wrong:

      --= Server =--
      use strict;
      use SOAP::Transport::HTTP;

      $SIG{PIPE} = 'IGNORE';

      my $daemon = SOAP::Transport::HTTP::Daemon
      -> new (LocalPort => 1983)

      print "Contact to SOAP server at ", $daemon->url, "\n";

      --= Client =--
      use strict;
      use Carp;

      my $uri = "http://localhost/";
      my $proxy = "http://localhost:1983/";

      use SOAP::Lite +autodispatch =>
      uri => $uri,
      proxy => $proxy,
      debug => sub { print @_; }

      The server works fine. The BEGIN{} for the SOAP::Lite client always dies
      with this error message:

      proxy: transport protocol not specified
      BEGIN failed--compilation aborted at ./client.pl line 22.

      I looked through the Lite.pm code and found that proxy() was being called
      with a single null parameter (which fired the error message). Going
      backwards from there seemed a bit daunting :)

      PS - When is the Perl SOAP::Lite book coming out? :)


      To unsubscribe from this group, send an email to:

      Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    • Show all 13 messages in this topic