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

Soap Daemon as Windows Service

Expand Messages
  • glaucon74
    I ve written a SOAP HTTP server daemon using SOAP::Lite. It works great. I can connect to it fine across the network when running it at the command line. I ve
    Message 1 of 1 , Sep 19, 2004
    • 0 Attachment
      I've written a SOAP HTTP server daemon using SOAP::Lite. It works great. I can connect to
      it fine across the network when running it at the command line.

      I've written Windows Services before using Roth's Win32::Daemon module. They work fine
      as well.

      Now I want to combine them so I will have a SOAP HTTP server damon running as a
      Windows Service.

      Here's my problem. Normally you put the code that you want to repeat forever in the
      Running section of the Win32 service and a sleep(1) in there so that it has time to
      communicate with the Windows Service Manager. In the case of the SOAP daemon there is
      no explicit infinite loop since you just call $daemon->handle and the loop is handled
      internally. This is a problem for a Windows service because if you don't release a slice of
      the CPU to the Windows service manager every once in awhile, then the service can't
      respond to the state changes. In short, I can't stop my Windows service without rebooting.

      How do I make my SOAP HTTP server daemon run as a Windows Service and respond
      correctly to Windows service manager?

      Thanks,
      Glaucon74
    Your message has been successfully submitted and would be delivered to recipients shortly.