anjiro has asked for the wisdom of the Perl Monks concerning the following question:
The first problem I encountered was trying to use SOAP::Transport::TCP. I started my server just like the perldoc said, like so:
Connecting to this server with the Linux client, like:my $daemon = SOAP::Transport::TCP::Server -> new(LocalAddr => 'localhost', LocalPort => $port, Listen => 5, Reuse => 1)->dispatch_to('RecommendServer'); print "Contact to SOAP server at " . join(':', $daemon->sockhost, $daemon->sockport) . $/; $daemon->handle;
works fine; I can access the objects I want, get stuff over the network, whatever. No problem. But then I try the same code on the Windows box, and I get the error: IO::Socket::INET: connect: Unknown error at tk3 line 199 (tk3 is my script; line 199 is the line above).my $soap_response = SOAP::Lite-> uri("http://tako:$port/RecommendServer")-> proxy("tcp://tako:$port") ->similarity_ranked($user);
So that was pretty irritating. I decided to try using the HTTP server rather than the TCP server:
Connecting from the client like so:SOAP::Transport::HTTP::Daemon ->new(LocalPort => $port, DEBUG => 1) ->dispatch_to('RecommendServer') ->handle;
worked great on Linux as usual. Then I tried it on Windows, and it worked! The first time. The second time (in the same session) I tried, it froze up. More accurately, it seemed to open a connection to the server and then block. No other clients (whether Linux or Windows) could connect. After about a minute and a half, the client finally manages to request the data it wants and stops blocking, allowing other clients to happily connect again.my $soap_response = SOAP::Lite-> uri("http://tako:$port/RecommendServer")-> proxy("http://tako:$port")->similarity_ranked($user);
I've tried using SOAP::Lite with +trace => qw(all), but the client just prints my debug message "contacting server" and then sits there until the connection actually works. I can't figure out how enable debugging on the server.
Thanks for any help!
Daniel Ashbrook
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: SOAP::Lite in Windows
by particle (Vicar) on Jul 28, 2003 at 15:41 UTC | |
by anjiro (Beadle) on Jul 29, 2003 at 01:20 UTC | |
by particle (Vicar) on Jul 29, 2003 at 12:36 UTC | |
by anjiro (Beadle) on Jul 30, 2003 at 01:12 UTC | |
|
Re: SOAP::Lite in Windows
by mod_alex (Beadle) on Jul 29, 2003 at 07:23 UTC | |
by anjiro (Beadle) on Jul 30, 2003 at 01:28 UTC |