in reply to SOAP autodispatch question

Use of inherited AUTOLOAD for non-method main::HellowWorld() is ...
Could this be a typo? Did you accidentally call method HellowWorld instead of HelloWorld? If you notice carefully, the message from GoodByeWorld was delivered. All of those warnings disturb me however ... but then again, i use mod_soap instead of autodispatch.

UPDATE:
Well, that didn't come out right ;). mod_soap is not a replacement for autodispatch, in fact, they can be used together. The problem is that autodispatch does some nasty UNIVERSAL::AUTOLOAD stuff. So, the solution to get rid of the warnings is to either not specify -w or use dispatch_from() instead:

#!/usr/bin/perl -w use strict; use SOAP::Lite dispatch_from => 'World', uri => 'World', proxy => 'http://soapserver.mycompany.com/soap/soapserver.cgi' ; print World->HelloWorld(); print World->GoodByeWorld("sweet");
I really prefer this style over autodispatch, but then again, i like my objects to have their own namespace. ;)

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)

Replies are listed 'Best First'.
Re: (jeffa) Re: SOAP autodispatch question
by rjray (Chaplain) on Apr 04, 2002 at 00:47 UTC

    This is indeed what I would consider the "best" approach under a "use strict" environment. I'm working on a book right now that uses SOAP::Lite a lot, and my approach has essentially been to document +autodispatch, then explain why it shouldn't be used for anything longer than 5-10 lines. I much prefer the clarity that dispatch_from maintains, particularly in that a person taking an initial glance at the source code is less likely to expect to find "HelloWorld" later in the script.

    And this is all before any issues of explicit data-encoding, namespace-association, or methods with characters not legal in Perl subroutine names, comes up :-).

    --rjray

Re: (jeffa) Re: SOAP autodispatch question
by rbc (Curate) on Apr 03, 2002 at 22:26 UTC
    grrrr *headslap* A typo! Thanks man.
    And thanks for the adivce I'll look into mod_soap.