Re: Soap::Lite install problems

Peter Smith <[email protected]> Thu, 20 Mar 2003 15:39:45 -0500
Newsgroups gmane.comp.windows.devel.soap.general
Message-ID <LISTSERV%[email protected]>
(Mr. Dougal Campbell,
    Thank you and sorry for my childish mistakes. When I wrote the previous
message I was a litte distracted. My scripts were correct on my machine,
they included the correct headers:  #!/usr/bin/perl  ....

    I've tried your sugestion too, I've run the script ./hibye.pl
but the problems remains the same. I've also included below the messages
./hibye.pl  display when it is run with the flag +"trace".
                           Thank you.
                                                            )


Hello. I've installed Soap::Lite on a machine running Red Hat 7.2.
I've creted a little client, just like the example found at
http://guide.soaplite.com/:

#!/usr/bin/perl
  use SOAP::Lite;
  print SOAP::Lite
    -> uri('http://www.soaplite.com/Demo')
    -> proxy('http://services.soaplite.com/hibye.cgi')
    -> hi()
    -> result;

This example works, so I said "Soap::Lite was installed (maybe)
successfully" (it prints "Hello World")

Then I've made a little server (example taken from
http://guide.soaplite.com/):

"hibye.cgi"

 #!/usr/bin/perl
  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";
  }

and then my own client:
"hibye.pl"

#!/usr/bin/perl
  use SOAP::Lite +trace;
  print SOAP::Lite
    -> uri('http://localhost/cgi-bin/Demo')
    -> proxy('http://localhost/cgi-bin/hibye.cgi')
    -> hi()
    -> result;
////////////////////////////////////////////////////
when I run:
       % perl hibye.pl  or
       % ./hibye.pl

I get the following messages:
%
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: hi
SOAP::Data::new: ()
SOAP::Data::new: ()
SOAP::Data::new: ()
SOAP::Data::new: ()
SOAP::Transport::HTTP::Client::send_receive: HTTP::Request=HASH(0x83a26dc)
SOAP::Transport::HTTP::Client::send_receive: POST http://localhost/cgi-
bin/hibye.cgi
Accept: text/xml
Accept: multipart/*
Content-Length: 451
Content-Type: text/xml; charset=utf-8
SOAPAction: "http://localhost/cgi-bin/Demo#hi"

<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-
ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-
ENV:encodingStyle="http://schemas.xmlsoap.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:hi
xmlns:namesp1="http://localhost/cgi-bin/Demo"/></SOAP-ENV:Body></SOAP-
ENV:Envelope>
SOAP::Transport::HTTP::Client::send_receive: HTTP::Response=HASH(0x84c4b60)
SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 500 Internal Server
Error
Connection: close
Date: Thu, 20 Mar 2003 06:01:45 GMT
Server: Apache/1.3.20 (Unix)  (Red-Hat/Linux) mod_ssl/2.8.4 OpenSSL/0.9.6b
DAV/1.0.2 PHP/4.0.6 mod_perl/1.24_01 mod_throttle/3.1.2
Content-Length: 631
Content-Type: text/xml; charset=utf-8
Client-Date: Thu, 20 Mar 2003 06:01: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.xmlsoap.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><SOAP-
ENV:Fault><faultcode xsi:type="xsd:string">SOAP-
ENV:Client</faultcode><faultstring xsi:type="xsd:string">Failed to access
class (cgi-bin::Demo) at /usr/lib/perl5/site_perl/5.6.0/SOAP/Lite.pm line
2100.
</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>
SOAP::Deserializer::deserialize: ()
SOAP::Parser::decode: ()
SOAP::SOM::new: ()
SOAP::Lite::DESTROY: ()
SOAP::Transport::DESTROY: ()
SOAP::Transport::HTTP::Client::DESTROY: ()
SOAP::SOM::DESTROY: ()
SOAP::Deserializer::DESTROY: ()
SOAP::Parser::DESTROY: ()
SOAP::Serializer::DESTROY: ()
SOAP::Data::DESTROY: ()
SOAP::Data::DESTROY: ()
SOAP::Data::DESTROY: ()
SOAP::Data::DESTROY: ()
%

I was curious, and I looked in the file logs of apache, and my request was
inserted into "etc/httpd/~logs/acces.log" like this:

127.0.0.1 - - [20/Mar/2003:00:57:55 +0200] "POST /cgi-bin/hibye.cgi
HTTP/1.0" 500 631 "-" "SOAP::Lite/Perl/0.55"

500 means : Internal Sever Error    :(((

////////////////////////////////////////////////////////////

both files (hibye.cgi and hibye.pl) are in http://localhost/cgi-bin

any other ordinary .cgi that I made in bash or perl work just fine in
http://localhost/cgi-bin/

////////////////////////////////////////////////////////////

when I installed Soap::Lite I deployed it in  /tmp and there
a followed the instructions and typed, in order:

   perl Makefile.PL
   make
   make test
   make install

-----------------------------------------------------------------------
I must say that I've installed the following perl modules to satisfy
some dependencies that Soap::Lite required:

1.HTML-Stream-1.54
2.IO-stringy-2.108
3.MailTools-1.58
4.XML-Parser-2.30
5.MIME-Lite-2.117
6.MIME-tools-5.411

but ... nothing.... :
127.0.0.1 - - [20/Mar/2003:02:09:18 +0200] "POST /cgi-bin/hibye.cgi
HTTP/1.0" 500 631 "-" "SOAP::Lite/Perl/0.55"

                                     Thank you.


 P.S. sorry for my English, am not a native English speaker :)

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com
You may be interested in Guerrilla Web Services .NET, 14 April 2003, in Torrance, CA
http://www.develop.com/courses/gwsdotnet

View archives and manage your subscription(s) at http://discuss.develop.com