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

autodispatch?

Expand Messages
  • Daryl Williams
    hello everyone. i am still pretty new to SOAP and SOAP::lite, so apologies if this is has already been covered, or if this is not the appropriate forum. i have
    Message 1 of 3 , Mar 26, 2002
    • 0 Attachment
      hello everyone. i am still pretty new to SOAP and SOAP::lite, so apologies
      if this is has already been covered, or if this is not the appropriate
      forum.
      i have tried to read all the documentation i could find...

      is there some way to use autodispatch and be able to use variables to
      supply
      values in constructing the uri, and proxy entries, etc. for example:

      use SOAP::Lite +autodispatch =>
      uri => "http://${server}:${port}/${service}",
      proxy => "http://${server}:${port}/";

      i would like the values to be supplied as run time command line arguments.
      i tried putting Getopt in a BEGIN block, but that didnt work. also, on a
      slightly
      different note, how does one check 'on_fault', and error handling in
      general
      when using the 'autodispatch' syntax?

      i'm playing with autodispatch, because i like the oo syntax it affords.
      other than
      the fact it uses UNIVERSAL::AUTOLOAD, are there any arguments against
      using it?

      thanks in advance,

      daryl
    • Paul Kulchenko
      Hi, Daryl! ... That s the way perl works. Take a look here for more information. http://groups.yahoo.com/group/soaplite/message/838 ... SOAP::Lite- self
      Message 2 of 3 , Mar 26, 2002
      • 0 Attachment
        Hi, Daryl!

        > i would like the values to be supplied as run time command line
        > arguments.
        > i tried putting Getopt in a BEGIN block, but that didnt work. also,
        That's the way perl works. Take a look here for more information.

        http://groups.yahoo.com/group/soaplite/message/838

        > slightly
        > different note, how does one check 'on_fault', and error handling
        > in general when using the 'autodispatch' syntax?
        SOAP::Lite->self returns SOAP::Lite object that handles autodispatch
        (see previous link for details). ->call() returns SOAP::SOM object of
        previous call.

        my $self = SOAP::Lite->self; # shouldn't change

        Foo->bar();

        my $call = $self->call; # change on per-call basis.

        die $call->faultstring if $call->fault;

        > the fact it uses UNIVERSAL::AUTOLOAD, are there any arguments
        > against using it?
        You may specify classes you want and only ::AUTOLOAD from those
        classes will be used:

        use SOAP::Lite dispatch_from => ['Foo', 'Bar'];

        Foo->foo(); Bar->bar();

        You don't need to use 'autodispatch' in this case. See dispatch_from
        method for more information.

        Let me know if you have any other questions.

        Best wishes, Paul.

        --- Daryl Williams <daryl@...> wrote:
        > hello everyone. i am still pretty new to SOAP and SOAP::lite, so
        > apologies
        > if this is has already been covered, or if this is not the
        > appropriate
        > forum.
        > i have tried to read all the documentation i could find...
        >
        > is there some way to use autodispatch and be able to use variables
        > to
        > supply
        > values in constructing the uri, and proxy entries, etc. for
        > example:
        >
        > use SOAP::Lite +autodispatch =>
        > uri => "http://${server}:${port}/${service}",
        > proxy => "http://${server}:${port}/";
        >
        > i would like the values to be supplied as run time command line
        > arguments.
        > i tried putting Getopt in a BEGIN block, but that didnt work. also,
        > on a
        > slightly
        > different note, how does one check 'on_fault', and error handling
        > in
        > general
        > when using the 'autodispatch' syntax?
        >
        > i'm playing with autodispatch, because i like the oo syntax it
        > affords.
        > other than
        > the fact it uses UNIVERSAL::AUTOLOAD, are there any arguments
        > against
        > using it?
        >
        > thanks in advance,
        >
        > daryl
        >
        >
        >
        > ------------------------ Yahoo! Groups Sponsor
        >
        > To unsubscribe from this group, send an email to:
        > soaplite-unsubscribe@yahoogroups.com
        >
        >
        >
        > Your use of Yahoo! Groups is subject to
        > http://docs.yahoo.com/info/terms/
        >
        >


        __________________________________________________
        Do You Yahoo!?
        Yahoo! Movies - coverage of the 74th Academy Awards´┐Ż
        http://movies.yahoo.com/
      • Daryl Williams
        hi paul, thanks for your reply. your explanation helped my understanding and i ve got my test script working. i m looking forward to using SOAP::lite in some
        Message 3 of 3 , Mar 27, 2002
        • 0 Attachment
          hi paul, thanks for your reply. your explanation helped my understanding
          and i've got my test script working. i'm looking forward to using SOAP::lite
          in some real applications.

          thanks for your help and a great software package.

          regards,

          daryl

          Paul Kulchenko wrote:

          >Hi, Daryl!
          >
          >>i would like the values to be supplied as run time command line
          >>arguments.
          >>i tried putting Getopt in a BEGIN block, but that didnt work. also,
          >>
          >That's the way perl works. Take a look here for more information.
          >
          >http://groups.yahoo.com/group/soaplite/message/838
          >
          >>slightly
          >>different note, how does one check 'on_fault', and error handling
          >>in general when using the 'autodispatch' syntax?
          >>
          >SOAP::Lite->self returns SOAP::Lite object that handles autodispatch
          >(see previous link for details). ->call() returns SOAP::SOM object of
          >previous call.
          >
          >my $self = SOAP::Lite->self; # shouldn't change
          >
          >Foo->bar();
          >
          >my $call = $self->call; # change on per-call basis.
          >
          >die $call->faultstring if $call->fault;
          >
          >>the fact it uses UNIVERSAL::AUTOLOAD, are there any arguments
          >>against using it?
          >>
          >You may specify classes you want and only ::AUTOLOAD from those
          >classes will be used:
          >
          >use SOAP::Lite dispatch_from => ['Foo', 'Bar'];
          >
          >Foo->foo(); Bar->bar();
          >
          >You don't need to use 'autodispatch' in this case. See dispatch_from
          >method for more information.
          >
          >Let me know if you have any other questions.
          >
          >Best wishes, Paul.
          >
          >--- Daryl Williams <daryl@...> wrote:
          >
          >>hello everyone. i am still pretty new to SOAP and SOAP::lite, so
          >>apologies
          >>if this is has already been covered, or if this is not the
          >>appropriate
          >>forum.
          >>i have tried to read all the documentation i could find...
          >>
          >>is there some way to use autodispatch and be able to use variables
          >>to
          >>supply
          >>values in constructing the uri, and proxy entries, etc. for
          >>example:
          >>
          >>use SOAP::Lite +autodispatch =>
          >>uri => "http://${server}:${port}/${service}",
          >>proxy => "http://${server}:${port}/";
          >>
          >>i would like the values to be supplied as run time command line
          >>arguments.
          >>i tried putting Getopt in a BEGIN block, but that didnt work. also,
          >>on a
          >>slightly
          >>different note, how does one check 'on_fault', and error handling
          >>in
          >>general
          >>when using the 'autodispatch' syntax?
          >>
          >>i'm playing with autodispatch, because i like the oo syntax it
          >>affords.
          >>other than
          >>the fact it uses UNIVERSAL::AUTOLOAD, are there any arguments
          >>against
          >>using it?
          >>
          >>thanks in advance,
          >>
          >>daryl
          >>
          >>
          >>
          >>------------------------ Yahoo! Groups Sponsor
          >>
          >>To unsubscribe from this group, send an email to:
          >>soaplite-unsubscribe@yahoogroups.com
          >>
          >>
          >>
          >>Your use of Yahoo! Groups is subject to
          >>http://docs.yahoo.com/info/terms/
          >>
          >>
          >
          >
          >__________________________________________________
          >Do You Yahoo!?
          >Yahoo! Movies - coverage of the 74th Academy Awards®
          >http://movies.yahoo.com/
          >
          >
          >To unsubscribe from this group, send an email to:
          >soaplite-unsubscribe@yahoogroups.com
          >
          >
          >
          >Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
          >
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.