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

500 internal server error - can't run the first example in the book

Expand Messages
  • jiewho
    Hi all, I am a beginner in SOAP programming and need your help in running the first example in the book Programming Web Services With SOAP . The Hello.pm is
    Message 1 of 1 , May 29, 2003
    View Source
    • 0 Attachment
      Hi all,

      I am a beginner in SOAP programming and need your help in running the
      first example in the book "Programming Web Services With SOAP".

      The Hello.pm is at '/home/huj/lib/'
      #!/usr/bin/perl -w
      package Hello;

      sub sayHello {
      shift;
      my $self = "Hello " . shift;
      return $self;
      }
      1;

      The Hello_server.cgi is at '/usr/local/bioapps/web/share/apache/cgi-
      bin/soap'

      #!/usr/bin/perl -w
      # hello_server.cgi - Hello SOAP handler

      use lib '/home/huj/lib';
      use SOAP::Transport::HTTP;

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

      Here is hw_client.pl
      #!/usr/bin/perl -w
      # hw_client.pl - Hello client
      use SOAP::Lite;
      my $name = shift;
      print "\n\nCalling the SOAP Server to say hello\n\n";

      print "The SOAP Server says: ";

      print SOAP::Lite
      -> uri('urn:Hello')
      -> proxy('http://localhost/cgi-bin/soap/Hello_server.cgi')
      -> sayHello($name)
      -> result . "\n\n";

      when I tried to run the client as

      ./hw_client.pl guest

      I got the following error:
      500 Internal Server Error at ./hw_client.pl line 9

      Can someone help me solving this problem? Thanks a lot for your time.

      Jeff
    Your message has been successfully submitted and would be delivered to recipients shortly.