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

More 'soapifying' existing modules: HTTP 500 returned from Apache

Expand Messages
  • welkin_inc
    I am trying to expose ApTest Manager modules via a soap interface. I get an HTTP 500 returned from Apache. My clue meter isn t picking up anything. Thanks in
    Message 1 of 1 , Sep 7, 2006
    • 0 Attachment
      I am trying to expose ApTest Manager modules via a soap interface.

      I get an HTTP 500 returned from Apache. My clue meter isn't picking
      up anything.

      Thanks in advance for your help.


      I am running an Apache 2.2 server on Windows XP.

      I first made a simple non-soap script to make sure that I could
      successfully execute some simple stuff from a single module locally.
      I won't show the code here because it will be very similar to the
      SOAP::Lite client shown below.

      I then created an entry into my httpd.conf file using an example from
      http://guide.soaplite.com/. The entry is:

      <Location /mod_soap>
      SetHandler perl-script
      PerlHandler Apache::SOAP
      PerlSetVar dispatch_to C:/www/atmSE_2.14/lib
      PerlSetVar options "compress_threshold => 10000"
      </Location>

      I then created my SOAP::Lite client:
      ---------------
      use SOAP::Lite +autodispatch =>
      uri => 'http://localhost/Account',
      proxy => 'http://localhost/mod_soap',
      ;

      use SOAP::Lite +trace;


      use strict;
      use warnings;
      use diagnostics;

      my $account = Account->new()
      or die "Couldn't create a new Account object: ",
      SOAP::Fault->faultstring, "\n";

      my @users = $account->userList();

      my $count = 0;
      foreach my $user( @users ) {
      print "\t", ++$count, ". $user\n";
      }
      ---------------

      I ran the client, and I see an HTTP 500 error returned from the Apache
      server. Here is the trace:
      ---------------
      C:\dev\ApTestManager>accountRPCTest.pl
      SOAP::Lite::call: ()
      SOAP::Serializer::envelope: ()
      SOAP::Serializer::envelope: new
      SOAP::Data::new: ()
      SOAP::Data::new: ()
      SOAP::Data::new: ()
      SOAP::Data::new: ()
      SOAP::Transport::HTTP::Client::send_receive: HTTP::Request=HASH(0x1c018f0)
      SOAP::Transport::HTTP::Client::send_receive: POST
      http://localhost/mod_soap HTTP
      /1.1
      Accept: text/xml
      Accept: multipart/*
      Accept: application/soap
      Content-Length: 422
      Content-Type: text/xml; charset=utf-8
      SOAPAction: "http://localhost/Account#new"

      <?xml version="1.0" encoding="UTF-8"?><soap:Envelope
      xmlns:xsi="http://www.w3.or
      g/2001/XMLSchema-instance"
      xmlns:soapenc="http://schemas.xmlsoap.org/soap/encodi
      ng/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      soap:encodingStyle="http://sch
      emas.xmlsoap.org/soap/encoding/"
      xmlns:soap="http://schemas.xmlsoap.org/soap/env
      elope/"><soap:Body><new xmlns="http://localhost/Account"
      xsi:nil="true" /></soap
      :Body></soap:Envelope>
      SOAP::Transport::HTTP::Client::send_receive:
      HTTP::Response=HASH(0x1f59a20)
      SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 500 Internal
      Server Error
      Connection: close
      Date: Thu, 07 Sep 2006 15:40:17 GMT
      Server: Apache/2.2.3 (Win32) mod_perl/2.0.3-dev Perl/v5.8.8
      Content-Length: 546
      Content-Type: text/xml; charset=utf-8
      Client-Date: Thu, 07 Sep 2006 15:40:17 GMT
      Client-Peer: 127.0.0.1:80
      Client-Response-Num: 1
      SOAPServer: SOAP::Lite/Perl/0.69

      <?xml version="1.0" encoding="UTF-8"?><soap:Envelope
      xmlns:xsi="http://www.w3.or
      g/2001/XMLSchema-instance"
      xmlns:soapenc="http://schemas.xmlsoap.org/soap/encodi
      ng/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      soap:encodingStyle="http://sch
      emas.xmlsoap.org/soap/encoding/"
      xmlns:soap="http://schemas.xmlsoap.org/soap/env
      elope/"><soap:Body><soap:Fault><faultcode>soap:Client</faultcode><faultstring>De
      nied access to method (new) in class (Account) at
      C:/Perl/site/lib/SOAP/Lite.pm
      line 2509.
      </faultstring></soap:Fault></soap:Body></soap:Envelope>
      SOAP::Deserializer::deserialize: ()
      SOAP::Parser::decode: ()
      SOAP::SOM::new: ()
      SOAP::Fault::new: ()
      SOAP::Fault::DESTROY: ()
      Use of uninitialized value in die at
      C:\dev\ApTestManager\accountRPCTest.pl
      line 14 (#1)
      (W uninitialized) An undefined value was used as if it were already
      defined. It was interpreted as a "" or a 0, but maybe it was a
      mistake.
      To suppress this warning assign a defined value to your variables.

      To help you figure out what was undefined, perl tells you what
      operation
      you used the undefined value in. Note, however, that perl
      optimizes your
      program and the operation displayed in the warning may not necessarily
      appear literally in your program. For example, "that $foo" is
      usually optimized into "that " . $foo, and the warning will refer to
      the concatenation (.) operator, even though there is no . in your
      program.
      ---------------

      Uncaught exception from user code:
      Couldn't create a new Account object:
      at C:\dev\ApTestManager\accountRPCTest.pl line 14
      SOAP::SOM::DESTROY: ()
      SOAP::Data::DESTROY: ()
      SOAP::Data::DESTROY: ()
      SOAP::Data::DESTROY: ()
      SOAP::Transport::HTTP::Client::DESTROY: ()
      SOAP::Parser::DESTROY: ()
      SOAP::Transport::DESTROY: ()
      SOAP::Serializer::DESTROY: ()
      SOAP::Data::DESTROY: ()
      SOAP::Deserializer::DESTROY: ()
      SOAP::Lite::DESTROY: ()

      C:\dev\ApTestManager>
    Your message has been successfully submitted and would be delivered to recipients shortly.