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

5923SOAPLite web services & Java Client

Expand Messages
  • Kirti Bodhmage
    Apr 12, 2007
    • 0 Attachment
      Hi,
      I am trying to run samples from the soap lite
      When I am trying to run client.pl from command prompt
      perl client.pl
      it does return value

      but if I try to do
      wget http://scout.ahds.ac.uk:86/perl/test/hibye.cgi
      or try to browse
      http://scout.ahds.ac.uk:86/perl/test/hibye.cgi

      it throws error

      <TITLE>411 Length Required</TITLE>
      </HEAD><BODY>
      <H1>Length Required</H1>
      A request of the requested method GET requires a valid Content-length.<P>

      Does this mean I have to set content length value of http header ? I
      am new to soaplite and not been able to understand how to remove this
      error.


      server.cgi
      #!perl -w
      use SOAP::Transport::HTTP;

      SOAP::Transport::HTTP::CGI
      -> dispatch_to('Demo')
      -> handle;

      package Demo;

      sub hi {
      return "hello, world";
      }

      sub bye {
      return "goodbye, cruel world";
      }

      sub languages {
      return ("Perl", "C", "sh");
      }

      and Client.pl

      #!perl -w
      use SOAP::Lite;
      print SOAP::Lite
      #-> uri('http://scout.ahds.ac.uk:86')

      -> uri('http://www.soaplite.com/Demo')
      -> proxy('http://scout.ahds.ac.uk:86/perl/test/hibye.cgi')
      -> languages()
      -> result;