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

Remote TCP connection... again

Expand Messages
  • Juan Julian Merelo Guervos
    Hi, I have been trying to get this remote TCP connection running. I use this server: use SOAP::Transport::TCP; $SIG{PIPE} = $SIG{INT} = IGNORE ; # don t want
    Message 1 of 1 , Oct 19, 2001
    View Source
    • 0 Attachment
      Hi,
      I have been trying to get this remote TCP connection running. I use
      this server:

      use SOAP::Transport::TCP;

      $SIG{PIPE} = $SIG{INT} = 'IGNORE'; # don't want to die on 'Broken pipe'
      or Ctrl-C

      my $daemon = SOAP::Transport::TCP::Server
      -> new (LocalAddr => shift , LocalPort => 8003, Listen => 5)
      -> dispatch_to(Test )
      ;
      print "Contact to SOAP server at ", join(':', $daemon->sockhost,
      $daemon->sockport), "\n";
      $daemon->handle;

      package Test;
      sub test{
      return "Test =>".join( ', ', @_ ). "\n";
      }
      --

      And this client (which is universal...)

      --
      use SOAP::Lite +trace;
      my $host = shift || 'localhost' ;
      my $port = shift || 8002;
      my $protocol = shift || 'http' ;
      print "Conectándose a $protocol://$host:$port\n";
      my $soap = SOAP::Lite->uri( 'http://geneura.ugr.es/Test' )
      ->proxy ("$protocol://$host:$port")
      ->on_fault( sub { my($soap, $res) = @_;
      die ref $res ? $res->faultdetail : $soap->transport->status, "\n";
      } );
      ;

      print $soap->test( "a", "b", "c")->result, "\n\n";
      --

      When I call with
      perl ttc3.pl hostname:8003 tcp

      --
      the server dies with:
      Contact to SOAP server at 10.10.103.71:8003

      bash-2.04$ Use of uninitialized value in pattern match (m//) at
      /usr/local/lib/perl5/site_perl/5.6.1/SOAP/Lite.pm line 1468.
      Use of uninitialized value in pattern match (m//) at
      /usr/local/lib/perl5/site_perl/5.6.1/SOAP/Lite.pm line 1468.
      Use of uninitialized value in subroutine entry at
      /usr/local/lib/perl5/site_perl/5.6.1/i686-linux/XML/Parser/Expat.pm line
      474.
      Use of uninitialized value in numeric eq (==) at
      /usr/local/lib/perl5/site_perl/5.6.1/IO/SessionData.pm line 160.

      --

      The same client with an http server (and the corresponding client),
      works correctly...

      J
      --
      Atalaya => http://granavenida.com/atalaya
      Tutorial Perl => http://granavenida.com/perl
      JJ Merelo => http://geneura.ugr.es/~jmerelo
    Your message has been successfully submitted and would be delivered to recipients shortly.