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

Re: [soaplite] hibye.cgi (guide.soaplite.com) - Premature end of script headers error (apache)

Expand Messages
  • Phil B
    On your client change the following uri as follows: - uri( urn:Demo ) ... From: kseeker1234 To: soaplite@yahoogroups.com Sent: Tuesday,
    Message 1 of 2 , Dec 25, 2007
    • 0 Attachment
      On your client change the following uri as follows:
       
       
          -> uri('urn:Demo')


       
      ----- Original Message ----
      From: kseeker1234 <kseeker123@...>
      To: soaplite@yahoogroups.com
      Sent: Tuesday, December 25, 2007 1:59:12 AM
      Subject: [soaplite] hibye.cgi (guide.soaplite.com) - Premature end of script headers error (apache)

      Hi,

      I am trying hibye example (hibye.cgi, hibye.pl) from
      guide.soaplite. com, but i am getting the following error.

      Following the error is the client and server code with minimal
      changes. Also, other CGI programs that generate html are running.

      ------------ --------- --------- --------- --------- --------- -
      client output:
      ------------ --------- --------- --------- --------- --------
      SOAP::Serializer: :envelope: hi
      SOAP::Transport: :HTTP::Client: :send_receive: POST
      http://localhost/ apache2-default/ cgi-bin/hibye. cgi HTTP/1.1
      Accept: text/xml
      Accept: multipart/*
      Content-Length: 467
      Content-Type: text/xml; charset=utf- 8
      SOAPAction: "http://localhost/ apache2-default/ cgi-bin/Demo# hi"

      <?xml version="1.0" encoding="UTF- 8"?><SOAP- ENV:Envelope
      xmlns:xsi="http://www.w3. org/1999/ XMLSchema- instance" xmlns:SOAP-EN
      C="http://schemas. xmlsoap.org/ soap/encoding/"
      xmlns:SOAP-ENV= "http://schemas. xmlsoap.org/ soap/envelope/"
      xmlns:xsd="http://w
      ww.w3.org/1999/ XMLSchema"
      SOAP-ENV:encodingSt yle="http://schemas. xmlsoap.org/ soap/encoding/"><SOAP-ENV: Body><namesp1: hi
      xmlns:namesp1= "http://localhost/ apache2-default/ cgi-bin/Demo"/></SOAP-ENV: Body></SOAP- ENV:Envelope>
      SOAP::Transport: :HTTP::Client: :send_receive: HTTP/1.1 500 Internal
      Server Error
      Connection: close
      Date: Tue, 25 Dec 2007 08:45:06 GMT
      Server: Apache/2.2.3 (Debian) mod_jk/1.2.18 PHP/5.2.0-8+ etch7
      mod_ssl/2.2. 3 OpenSSL/0.9. 8c
      Content-Length: 0
      Content-Type: text/plain; charset=UTF- 8
      Client-Date: Tue, 25 Dec 2007 08:45:06 GMT
      Client-Peer: 127.0.0.1:80
      Client-Response- Num: 1

      500 Internal Server Error at hibye.pl line 7

      ------------ --------- --------- --------- --------- --------- -
      apache2 error log:

      [error] [client 127.0.0.1] BEGIN failed--compilation aborted at
      /var/www/apache2- default/cgi- bin/hibye. cgi line 5.
      [error] [client 127.0.0.1] Premature end of script headers: hibye.cgi

      ------------ --------- --------- --------- --------- --------- -

      Client:
      ------------ --------- --------- --------- --------- --------- -
      #!/usr/bin/perl

      # -- SOAP::Lite -- guide.soaplite. com -- Copyright (C) 2001 Paul
      Kulchenko --

      use SOAP::Lite +trace => [qw/ debug method fault /];

      my $soap_res = SOAP::Lite
      -> uri('http://localhost/ apache2-default/ cgi-bin/Demo')
      -> proxy('http://localhost/ apache2-default/ cgi-bin/hibye. cgi')
      ->hi();

      die "$soap_res-> faultstring, and, $soap_res->faultcod e,
      $soap_res->faultdet ail \n" if $soap_res->fault;
      print $soap_res->result;

      ------------ --------- --------- --------- --------- --------- -

      ------------ --------- --------- --------- --------- --------- -
      Server:
      ------------ --------- --------- --------- --------- --------- -
      #!/usr/bin/perl -w

      # -- SOAP::Lite -- guide.soaplite. com -- Copyright (C) 2001 Paul
      Kulchenko --

      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");
      }

      ------------ --------- --------- --------- --------- --------- -

      Please help.




      Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.
    Your message has been successfully submitted and would be delivered to recipients shortly.