Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??

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";

In reply to Help with SOAP::Lite error by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others taking refuge in the Monastery: (9)
    As of 2014-08-20 08:01 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      The best computer themed movie is:











      Results (107 votes), past polls