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

2121RE: [soaplite] Help with mod_soap based server

Expand Messages
  • Keanan Smith
    Nov 22, 2002
      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@...]
      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();

      And my output looks like this:
      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(0x40cc74)
      SOAP::Transport::HTTP::Client::send_receive: POST
      http://www.server.com:8080/soap/Demo.pm
      Accept: text/xml
      Accept: multipart/*
      Content-Length: 451
      Content-Type: text/xml; charset=utf-8
      SOAPAction: "http://www.server.com/Demo#hi"

      <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope
      xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
      xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:xsd="http://www.w3.org/1999/XMLSchema" SOAP-
      ENV:encodingStyle="http://schemas.xmlsoap.org/soap
      /encoding/"><SOAP-ENV:Body><namesp1:hi xmlns:names
      p1="http://www.server.com/Demo"/></SOAP-ENV:Body></SOAP-ENV:Envelope>
      SOAP::Transport::HTTP::Client::send_receive: HTTP:
      :Response=HASH(0x5cad6c)
      SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 500 Internal
      Server Error
      Connection: close
      Date: Fri, 22 Nov 2002 18:41:27 GMT
      Server: Apache/1.3.27 (Unix) mod_perl/1.27
      Content-Length: 622
      Content-Type: text/xml; charset=utf-8
      Client-Date: Fri, 22 Nov 2002 18:41:29 GMT
      Client-Response-Num: 1
      SOAPServer: SOAP::Lite/Perl/0.55

      <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope
      xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
      xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:xsd="http://www.w3.org/1999/XMLSchema" SOAP-
      ENV:encodingStyle="http://schemas.xmlsoap.org/soap
      /encoding/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode
      xsi:type="xsd:string">SOAP-ENV:Client</faultcode><faultstring
      xsi:type="xsd:string">Failed to access class (Demo): Demo.pm did not
      return a true value at (eval 99) line 3.
      </faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>
      SOAP::Deserializer::deserialize: ()
      SOAP::Parser::decode: ()
      SOAP::SOM::new: ()
      SOAP::Lite::DESTROY: ()
      SOAP::SOM::DESTROY: ()
      SOAP::Deserializer::DESTROY: ()
      SOAP::Parser::DESTROY: ()
      SOAP::Transport::DESTROY: ()
      SOAP::Transport::HTTP::Client::DESTROY: ()
      SOAP::Serializer::DESTROY: ()
      SOAP::Data::DESTROY: ()
      SOAP::Data::DESTROY: ()
      SOAP::Data::DESTROY: ()
      SOAP::Data::DESTROY: ()

      So I'm looking for any pointers on which part of this setup is the
      problem.

      Thank you,

      Michael




      To unsubscribe from this group, send an email to:
      soaplite-unsubscribe@yahoogroups.com



      Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    • Show all 4 messages in this topic