http://www.perlmonks.org?node_id=1008208

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hello,

I am trying to get a SOAP::Lite client/server working but keep getting this error on the client side when using autodispatch (Not a HASH reference at C:/Perl/site/lib/SOAP/Lite.pm line 3828.) with SOAP::Lite version 0.712 or higher. With the older version 0.60a of this module the code seems to work as expected.

Martin Kutter (the author of this module) conveyed that I could be missing an API, which I am still not sure of as I went through all the documentation. Can you please help review this and point out the error? Thanks

############## Server ############## #!perl -w use strict; use warnings; use SOAP::Lite +trace => 'all'; use SOAP::Transport::HTTP; my $daemon = SOAP::Transport::HTTP::Daemon->new( LocalAddr => 'localhost', LocalPort => 8001, listen => 5 ); $daemon->dispatch_to('Hello'); print "Contact SOAP server at ", $daemon->url, "\n"; $daemon->handle(); package Hello; sub new { my $class = shift; my $self = { TEXT => "ABC", @_, }; bless $self, $class; return $self; } sub getText { my ($self, $arg) = @_; return $self->{TEXT}; } 1; ############## Client ############## #!perl -w use strict; use warnings; use SOAP::Lite +autodispatch => on_fault => sub { my ($soap, $res) = @_; print ref $res ? $res->faultstring : $soap->transport->status, + "\n"; return "SOAP_TRANSPORT_ERROR"; }, #trace => 'all', ; my $uri = "http://localhost/Hello"; my $proxy = "http://localhost:8001/server.pl"; SOAP::Lite->self->uri($uri)->proxy($proxy); my $h = Hello->new(); my $output = $h->getText(); print $output . "\n";