gnork has asked for the wisdom of the Perl Monks concerning the following question:
BTW, if you ran out of sockets with SOAP::Lite or had to wait 30secs to start a new SOAP Server (Port already in use), have a look at the Reuse option above.# define the routines ... sub return_sumfink { #do something } # and $daemon = SOAP::Transport::HTTP::Daemon -> new(LocalAddr => $host, LocalPort => $port, Reuse => 1) -> dispatch_to('return_sumfink','aFunction') $daemon->handle;
This worked like a charm, but now for the language independend way ... AFAIK, one way to construct the URN is using Namespaces (packages) within the Server. Lets say I defined a package ExternalIO in the server, which contains the sub return_sumfink. NOTE: I have no external modules (e.g. ExternalIO.pm), its within the server.$s = SOAP::Lite ->proxy("http://$machine:$port") ->on_fault(sub{}); $r = $s->test_connection; unless (defined $r && defined $r->envelope) { return 'NOGO:', $s->transport->status, "\n"; } return $s->call(@_)->result;
The sub return_sumfink never gets called. Where am I wrong? Is there good reading material about SOAP somewhere out there?use SOAP::Lite +autodispatch => uri=>'ExternalIO', proxy=>'http://localhost:8081'; $hi = return_sumfink('scalar'); print $hi . "\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: SOAP::Lite Confusion
by gnork (Scribe) on Dec 05, 2003 at 09:12 UTC |