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

writing a client to use a TCP server

Expand Messages
  • Weidong Wang
    Version 0.50 supports a TCP SOAP server. SOAP::Transport::TCP gives an example of how to get a server to run, but it does not give an example. I was able to
    Message 1 of 3 , Jun 19, 2001
      Version 0.50 supports a TCP SOAP server. SOAP::Transport::TCP gives
      an example of how to get a server to run, but it does not give an
      example.

      I was able to get the server running.

      For the client, I thought all I need to do is to change the proxy
      specification in calling SOAP::Lite from "http://localhost/soap" to
      something like "tcp://localhost:88/" if my TCP server runs on the
      localhost and listens on port 88. But it does not work. I got error:

      IO::Socket::INET: Bad service '88/'

      What was the problem here? Thanks.

      Weidong

      P.S.: My client code looks like the following:

      use SOAP::Lite +trace;

      my $soap_response = SOAP::Lite
      -> uri('Temperatures')
      -> proxy('tcp://localhost:88/');

      print $soap_response
      -> c2f(37.5)
      -> result;
    • Weidong Wang
      Figured it out: tcp:localhost:88 should be the proxy spec.
      Message 2 of 3 , Jun 19, 2001
        Figured it out: 'tcp:localhost:88' should be the proxy spec.

        --- In soaplite@y..., "Weidong Wang" <wwang@f...> wrote:
        > Version 0.50 supports a TCP SOAP server. SOAP::Transport::TCP gives
        > an example of how to get a server to run, but it does not give an
        > example.
        >
        > I was able to get the server running.
        >
        > For the client, I thought all I need to do is to change the proxy
        > specification in calling SOAP::Lite from "http://localhost/soap" to
        > something like "tcp://localhost:88/" if my TCP server runs on the
        > localhost and listens on port 88. But it does not work. I got error:
        >
        > IO::Socket::INET: Bad service '88/'
        >
        > What was the problem here? Thanks.
        >
        > Weidong
        >
        > P.S.: My client code looks like the following:
        >
        > use SOAP::Lite +trace;
        >
        > my $soap_response = SOAP::Lite
        > -> uri('Temperatures')
        > -> proxy('tcp://localhost:88/');
        >
        > print $soap_response
        > -> c2f(37.5)
        > -> result;
      • paulclinger@yahoo.com
        Hi, Weidong! ... Right. I m thinking about support tcp:// also, yet tcp is not a registered schema. btw, examples for all clients you can find in
        Message 3 of 3 , Jun 19, 2001
          Hi, Weidong!

          --- In soaplite@y..., "Weidong Wang" <wwang@f...> wrote:
          > Figured it out: 'tcp:localhost:88' should be the proxy spec.
          Right. I'm thinking about support tcp:// also, yet tcp is not a
          registered schema. btw, examples for all clients you can find in
          examples/allclients.pl

          Best wishes, Paul.

          >
          > --- In soaplite@y..., "Weidong Wang" <wwang@f...> wrote:
          > > Version 0.50 supports a TCP SOAP server. SOAP::Transport::TCP
          gives
          > > an example of how to get a server to run, but it does not give an
          > > example.
          > >
          > > I was able to get the server running.
          > >
          > > For the client, I thought all I need to do is to change the proxy
          > > specification in calling SOAP::Lite from "http://localhost/soap"
          to
          > > something like "tcp://localhost:88/" if my TCP server runs on the
          > > localhost and listens on port 88. But it does not work. I got
          error:
          > >
          > > IO::Socket::INET: Bad service '88/'
          > >
          > > What was the problem here? Thanks.
          > >
          > > Weidong
          > >
          > > P.S.: My client code looks like the following:
          > >
          > > use SOAP::Lite +trace;
          > >
          > > my $soap_response = SOAP::Lite
          > > -> uri('Temperatures')
          > > -> proxy('tcp://localhost:88/');
          > >
          > > print $soap_response
          > > -> c2f(37.5)
          > > -> result;
        Your message has been successfully submitted and would be delivered to recipients shortly.