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

Re: [soaplite] Irregular message fault: Can't call method "body" without a package or object reference

Expand Messages
  • Duncan Cameron
    ... This might not be the cause of the problem but the @ISA assignment should be in a BEGIN block or the my_package package should be defined before the server
    Message 1 of 2 , Oct 28, 2005
    View Source
    • 0 Attachment
      On 2005-10-28 at 13:51:47 CristiAn Fuenzalida wrote:

      >Hello :-),
      >
      >I'm using SOAP::Lite/Perl/0.65_3, and i get with an "irregular
      >frequency"

      ... snipped ...

      >The server.cgi code where the problem ocurrs is:
      >
      >my $cgi_server = SOAP::Transport::HTTP::CGI
      >->packager(SOAP::Packager::MIME->new)
      >-> dispatch_to('my_package);
      >
      >$cgi_server->serializer->encoding("ISO-8859-1");
      >$cgi_server->handle;
      >
      >package my_package;
      >use vars qw(@ISA);
      >@ISA = qw(Exporter SOAP::Server::Parameters);
      >
      >sub getValue {
      >my $class = shift;
      >my $request = pop;
      >my $body = $request->body->{getValue}; # HERE IS THE PROBLEM !!!
      >...
      >}
      >1;
      This might not be the cause of the problem but the @ISA assignment
      should be in a BEGIN block or the my_package package should be
      defined before the server code. Currently the @ISA statement will
      have been compiled but not have been executed when the getValue()
      method is called. Also, you don't need to use Exporter.

      Regards
      Duncan
    Your message has been successfully submitted and would be delivered to recipients shortly.