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

Stupid Content-Encoding error...

Expand Messages
  • Stephen.Rosman@parliament.vic.gov.au
    I m trying to get the SOAP::Lite library working and I m getting an insanely stupid error. (SOAP-Lite 0.55 on Apache 1.3 on Red Hat Linux 7.0) I set up the
    Message 1 of 2 , Feb 2, 2003
    • 0 Attachment
      I'm trying to get the SOAP::Lite library working and I'm getting an
      insanely stupid
      error. (SOAP-Lite 0.55 on Apache 1.3 on Red Hat Linux 7.0)

      I set up the basic quickstart example (http://guide.soaplite.com/) for the
      CGI server
      and when I run the client perl script it returns the message

      "Unexpected Content-Encoding 'script ' returned"

      When I use the -w switch on the shebang line it returns

      "Unexpected Content-Encoding '-w' returned"

      So something screwy seems to be going on with the way Apache is returning
      the
      Content-Encoding header. I've checked the output with +trace and the
      server is
      actually returning the (stupid) content-encoding reported by the client.

      I'm just using the standard cgi-script handler +ExecCGI on the server
      script.

      I've checked google, the mailing list archive, the Apache documentation,
      the SOAP::Lite
      documentation and no one else in the world appears to be having this
      problem.


      Apache configuration for the directory:
      --------------------
      AddHandler cgi-script .cgi
      Options +ExecCGI +Indexes
      --------------------


      serv.cgi
      --------------------
      #!/usr/bin/perl

      use SOAP::Transport::HTTP;

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

      package Blah;

      sub test {
      return "blah blah blah";
      }
      --------------------


      client.pl
      --------------------
      #!/usr/bin/perl

      use SOAP::Lite +trace;

      $result = SOAP::Lite
      ->uri('http://www.soaplite.com/Blah')
      ->proxy('http://localhost/auth/soap/serv.cgi')
      ->test()
      ->result;

      print "result: $result\n";
      --------------------


      Output of client.pl
      --------------------
      SOAP::Transport::new: ()
      SOAP::Serializer::new: ()
      SOAP::Deserializer::new: ()
      SOAP::Parser::new: ()
      SOAP::Lite::new: ()
      SOAP::Transport::HTTP::Client::new: ()
      SOAP::Lite::call: ()
      SOAP::Serializer::envelope: ()
      SOAP::Serializer::envelope: test
      SOAP::Data::new: ()
      SOAP::Data::new: ()
      SOAP::Data::new: ()
      SOAP::Data::new: ()
      SOAP::Transport::HTTP::Client::send_receive: HTTP::Request=HASH(0x83a91a8)
      SOAP::Transport::HTTP::Client::send_receive: POST
      http://localhost/auth/soap/ser
      v.cgi
      Accept: text/xml
      Accept: multipart/*
      Content-Length: 452
      Content-Type: text/xml; charset=utf-8
      SOAPAction: "http://www.soaplite.com/Blah#test"

      <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENC
      ="http://
      schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle
      ="http://schemas.xmlso
      ap.org/soap/encoding/" xmlns:SOAP-ENV
      ="http://schemas.xmlsoap.org/soap/envelope/
      " xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd
      ="http://www.w3
      .org/1999/XMLSchema"><SOAP-ENV:Body><namesp1:test xmlns:namesp1
      ="http://www.soap
      lite.com/Blah"/></SOAP-ENV:Body></SOAP-ENV:Envelope>
      SOAP::Transport::HTTP::Client::send_receive: HTTP::Response=HASH(0x8486f90)
      SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 200 OK
      Connection: close
      Date: Mon, 03 Feb 2003 06:29:46 GMT
      Server: Apache/1.3.12 (Unix) (Red Hat/Linux) mod_ssl/2.6.6 OpenSSL/0.9.5a
      mod_p
      erl/1.24
      Content-Encoding: script
      Content-Length: 541
      Content-Type: text/xml; charset=utf-8
      Client-Date: Mon, 03 Feb 2003 06:29:46 GMT
      Client-Peer: 127.0.0.1:80
      SOAPServer: SOAP::Lite/Perl/0.55

      <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENC
      ="http://
      schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle
      ="http://schemas.xmlso
      ap.org/soap/encoding/" xmlns:SOAP-ENV
      ="http://schemas.xmlsoap.org/soap/envelope/
      " xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd
      ="http://www.w3
      .org/1999/XMLSchema"><SOAP-ENV:Body><namesp1:testResponse xmlns:namesp1
      ="http://
      www.soaplite.com/Blah"><s-gensym3 xsi:type="xsd:string">blah blah
      blah</s-gensym
      3></namesp1:testResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>
      Unexpected Content-Encoding 'script ' returned
      SOAP::Lite::DESTROY: ()
      SOAP::Transport::DESTROY: ()
      SOAP::Transport::HTTP::Client::DESTROY: ()
      SOAP::Deserializer::DESTROY: ()
      SOAP::Parser::DESTROY: ()
      SOAP::Serializer::DESTROY: ()
      SOAP::Data::DESTROY: ()
      SOAP::Data::DESTROY: ()
      SOAP::Data::DESTROY: ()
      SOAP::Data::DESTROY: ()
      --------------------

      If anyone can help I'd appreciate it.


      --
      Stephen Rosman - Parliament House Web Developer - phone: 9651 8490
    • Stephen.Rosman@parliament.vic.gov.au
      I ve had a bit of a rummage in the source code, I ve installed it successfully on another server, I ve reinstalled libnet, libwww, SOAP::Lite, I ve got the
      Message 2 of 2 , Feb 3, 2003
      • 0 Attachment
        I've had a bit of a rummage in the source code,
        I've installed it successfully on another server,
        I've reinstalled libnet, libwww, SOAP::Lite,
        I've got the daemon version working,
        I've concluded that it's Apache's fault.

        Cheers

        --
        Stephen Rosman - Parliament House Web Developer - phone: 9651 8490
      Your message has been successfully submitted and would be delivered to recipients shortly.