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

Re: Help with mod_soap based server

Expand Messages
  • smershman
    Hi As with the previous poster I m getting started with SOAP::Light. So far I ve sucessfully set up standalone and CGI based servers but I ve been unable to
    Message 1 of 4 , Apr 15 10:14 AM
    View Source
    • 0 Attachment
      Hi
      As with the previous poster I'm getting started with SOAP::Light. So far I've sucessfully
      set up standalone and CGI based servers but I've been unable to get Apache::SOAP
      working.
      I've copied the example below (with '1;' on end of Demo package) but I'm running into
      some problems.

      On the first run of the client I get:

      [error] [client 192.168.200.2] Can't locate Apache.pm in @INC (@INC contains: /usr/
      lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 /usr/lib/perl5/
      site_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0 /usr/lib/
      perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi /usr/lib/
      perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl .) at /usr/lib/perl5/site_perl/
      5.8.0/SOAP/Transport/HTTP.pm line 412.
      Compilation failed in require at (eval 1) line 3.

      Then on subsequent attempts:

      [client 192.168.200.2] Can't call method "configure" on an undefined value at /usr/
      lib/perl5/site_perl/5.8.0/Apache/SOAP.pm line 23.

      Would appreciate some suggestions.
      Thanks
      Phill



      --- In soaplite@yahoogroups.com, Keanan Smith <KSmith@n...> wrote:
      > That's actually a perl error, nothing whatsoever to do with soap, your
      > 'demo' package needs to end with a true value (typically by simply placing a
      > '1;' at the end of the file) to indicate the package successfully loaded.
      >
      > (If the package can't successfully load, obviously you can't call methods in
      > it.)
      >
      > -----Original Message-----
      > From: mg8981b [mailto:mg8981b@a...]
      > Sent: Friday, November 22, 2002 12:04 PM
      > To: soaplite@yahoogroups.com
      > Subject: [soaplite] Help with mod_soap based server
      >
      >
      > Hi, just getting started with SOAP::Lite, and I'm trying to set up a
      > mod_soap based server. I can't find many examples of how to do this,
      > so I'm kind of guessing here. Most of the examples on the web deal with
      > stand-alone http servers, or apache servers using the CGI transport. I'm
      > looking for something that will enable me to use the Apache::SOAP transport.
      >
      > The references that I've been using are:
      > http://www.perl.com/pub/a/2001/04/24/soap.html
      > http://builder.cnet.com/webbuilding/0-7704-8-4874769-1.html
      > http://theoryx5.uwinnipeg.ca/CPAN/data/SOAP-Lite/Apache/SOAP.html
      >
      > My soap section in httpd.conf looks like this:
      > <Location /soap>
      > SetHandler perl-script
      > PerlHandler Apache::SOAP
      > PerlSetVar dispatch_to "/devel/perl/soap/release, Demo::hi"
      > PerlSetVar options "compress_threshold => 10000"
      > </Location>
      >
      > My server module is named Demo.pm, and looks like this:
      > package Demo;
      >
      > sub hi {
      > return "hello, world";
      > }
      >
      > sub bye {
      > return "goodbye, cruel world";
      > }
      >
      > My soap client is named t_hibye_soap_client.pl, and lloks like this:
      > use SOAP::Lite +trace;
      > print SOAP::Lite
      > -> uri('http://www.server.com/Demo')
      > -> proxy('http://www.server.com:8080/soap/Demo.pm')
      > -> hi()
      > -> result();
      >

      My output:
      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(0x29b2f8)
      SOAP::Transport::HTTP::Client::send_receive: POST http://smershnet.smersh.casa/
      mod_soap/Tester.pm
      Accept: text/xml
      Accept: multipart/*
      Content-Length: 457
      Content-Type: text/xml; charset=utf-8
      SOAPAction: "http://smershnet.smersh.casa/Tester#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://
      smershnet.smersh.casa/Tester"/></SOAP-ENV:Body></SOAP-ENV:Envelope>
      SOAP::Transport::HTTP::Client::send_receive: HTTP::Response=HASH(0x416b50)
      SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 500 Internal Server Error
      Connection: close
      Date: Tue, 15 Apr 2003 19:07:31 GMT
      Server: Apache/2.0.45 (Unix) mod_perl/1.99_08 Perl/v5.8.0 mod_ssl/2.0.45
      OpenSSL/0.9.6b PHP/4.3.0
      Content-Length: 695
      Content-Type: text/html; charset=iso-8859-1
      Client-Date: Tue, 15 Apr 2003 17:07:29 GMT
      Client-Peer: 192.168.200.4:80
      Client-Response-Num: 1
      Title: 500 Internal Server Error
      X-Pad: avoid browser bug

      <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
      <html><head>
      <title>500 Internal Server Error</title>
      </head><body>
      <h1>Internal Server Error</h1>
      <p>The server encountered an internal error or
      misconfiguration and was unable to complete
      your request.</p>
      <p>Please contact the server administrator,
      admin@... and inform them of the time the error occurred,
      and anything you might have done that may have
      caused the error.</p>
      <p>More information about this error may be available
      in the server error log.</p>
      <hr />
      <address>Apache/2.0.45 (Unix) mod_perl/1.99_08 Perl/v5.8.0 mod_ssl/2.0.45
      OpenSSL/0.9.6b PHP/4.3.0 Server at smershnet.smersh.casa Port 80</address>
      </body></html>

      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: ()
    Your message has been successfully submitted and would be delivered to recipients shortly.