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

SOAP::Transport::HTTP::Daemon

Expand Messages
  • dukeofperl
    My search did not turn up any existing threads on this subject. I m trying to use the SOAP::Transport::HTTP::Daemon class to establish a standalone server. My
    Message 1 of 2 , Aug 26, 2010
    • 0 Attachment
      My search did not turn up any existing threads on this subject.

      I'm trying to use the SOAP::Transport::HTTP::Daemon class to establish a standalone server.

      My code is straight from the guide.soaplite.com web page

      #!/usr/bin/perl

      use strict;
      use warnings;

      use SOAP::Transport::HTTP;
      use Demo;

      my $daemon = SOAP::Transport::HTTP::Daemon
      -> new (LocalPort => 8001)
      -> dispatch_to('/home/mmouse/lib')
      ;

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

      When executed (Red Hat 5) it hangs at this line ... (does not return prompt)

      Contact to SOAP server at localhost:8001/

      and netstat -a does not show any activity on port 8001 which implies the daemon did not start.

      I would appreciate any help with this issue, especially with what behaviour I should expect from this code.

      Thank you
    • Dave Howorth
      ... ... It works for me, after I removed use Demo . It s not supposed to return - did you read the docs? [hint The SOAP::Transport::HTTP::Daemon class
      Message 2 of 2 , Aug 27, 2010
      • 0 Attachment
        dukeofperl wrote:
        > My search did not turn up any existing threads on this subject.
        >
        > I'm trying to use the SOAP::Transport::HTTP::Daemon class to establish a standalone server.
        >
        > My code is straight from the guide.soaplite.com web page
        <snip>
        > When executed (Red Hat 5) it hangs at this line ... (does not return prompt)

        It works for me, after I removed "use Demo".

        It's not supposed to return - did you read the docs? [hint "The
        SOAP::Transport::HTTP::Daemon class encapsulates a reference to an
        object of the HTTP::Daemon class (from the LWP package)". Did you read
        the HTTP::Daemon docs?]

        > Contact to SOAP server at localhost:8001/
        >
        > and netstat -a does not show any activity on port 8001 which implies the daemon did not start.

        netstat -a doesn't show any activity for me either, so evidently that
        does NOT imply that the daemon didn't start.

        But what does work is making a connection to the server with my browser!

        Cheers, Dave
      Your message has been successfully submitted and would be delivered to recipients shortly.