in reply to Re^2: SSL Soap Server daemon stopping
in thread SSL Soap Server daemon stopping
Here's a fix :) If something dies, add some eval {};warn $@ if $@;
#!/usr/bin/perl -w use HTTP::Daemon::SSL; use HTTP::Status; use SOAP::Lite; use SOAP::Transport::HTTP; use XML::Simple; use TTPSubmit; while(1){ # infinite loop, if Daemon stop for some reason # Make sure you have a certs/ directory with "server-cert.pem" # and "server-key.pem" in it before running this! my $daemon = new HTTP::Daemon::SSL SSL_key_file => '(takenout)server-key.pem', SSL_cert_file => '(takenout)server-cert.pem', LocalPort => 8080; my $soap = SOAP::Transport::HTTP::Server -> new ( ) -> dispatch_to('TTPSubmit'); print "Please contact me at: <URL:", $daemon->url, ">\n"; while (my $conn = $daemon->accept()) { while (my $request = $conn->get_request()) { $soap->request($request); $soap->handle(); my $response = $soap->response(); $conn->send_response($response); } $conn->close; undef($conn); } }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: SSL Soap Server daemon stopping
by perlchild (Acolyte) on Aug 24, 2008 at 22:14 UTC | |
by Anonymous Monk on Aug 25, 2008 at 01:42 UTC | |
by perlchild (Acolyte) on Apr 26, 2012 at 16:19 UTC | |
by Anonymous Monk on Apr 27, 2012 at 02:51 UTC | |
Re^4: SSL Soap Server daemon stopping
by perlchild (Acolyte) on Aug 23, 2008 at 12:49 UTC |
In Section
Seekers of Perl Wisdom