I'm having some fairly strange problems trying to use SOAP::Lite with Windows. I'm running a Linux server and some Linux clients, and everything works perfectly. However, when I use the same client code on Windows, it doesn't work right.

The first problem I encountered was trying to use SOAP::Transport::TCP. I started my server just like the perldoc said, like so:

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;
Connecting to this server with the Linux client, like:
my $soap_response = SOAP::Lite-> uri("http://tako:$port/RecommendServer")-> proxy("tcp://tako:$port") ->similarity_ranked($user);
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).

So that was pretty irritating. I decided to try using the HTTP server rather than the TCP server:

SOAP::Transport::HTTP::Daemon ->new(LocalPort => $port, DEBUG => 1) ->dispatch_to('RecommendServer') ->handle;
Connecting from the client like so:
my $soap_response = SOAP::Lite-> uri("http://tako:$port/RecommendServer")-> proxy("http://tako:$port")->similarity_ranked($user);
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.

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


In reply to SOAP::Lite in Windows by anjiro

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.