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

Re: before I pull my hair out please stop the madness :)

Expand Messages
  • Paul Kulchenko
    Hi, Bryan! I m CC-ing soaplite list, because it may be interesting for others also. ... Short summary first. Basically OO calls can do the same as
    Message 1 of 1 , Aug 7, 2001
    View Source
    • 0 Attachment
      Hi, Bryan!

      I'm CC-ing soaplite list, because it may be interesting for others
      also.

      > my $soap = SOAP::Lite
      > -> proxy($self{'be_proxy'})
      > -> uri($self{'be_uri'});
      >
      > my $msg = $soap->Hello->execute()->result;
      Short summary first.

      Basically OO calls can do the same as autodispatched calls, only you
      need to specify object first:

      AD:
      $result = CLASS->method(@parameters);

      OO:
      # specify uri as http://something/CLASS
      $result = $soap->call('method', @parameters)->result;

      AD:
      $result = $OBJECT->method(@parameters);

      OO:
      $result = $soap->call('method', $OBJECT, @parameters)->result;

      so, as usual in OO calls, it's translated to function call with
      object as the first parameter. ONLY difference is with CLASS, call,
      because CLASS name wil NOT go as the first parameter (should be
      specified in URI).

      In your case it'll be something like:

      my $msg = $soap->execute()->result;

      -- OR --

      my $msg = $soap->call('execute')->result;

      # uri should have /Hello as a path, for example
      # ->uri('http://somewhere.com/Hello')

      if you call it as an object call (say, $msg is an object):

      my $response = $soap->call('mymethod', $msg, @parameters)->result;

      # is the same as $msg->mymethod(@parameters);

      Hope it helps.

      Best wishes, Paul.

      --- Bryan Dumm <bryan@...> wrote:
      > Howdy,
      >
      > I don't know how to do what I want to do, and was wondering
      > if you have any answers.
      >
      > I have a bunch of modules on the server side that I am
      > autodispatching like
      >
      > my $daemon = SOAP::Transport::HTTP::Daemon
      > -> new (LocalAddr => 'bobby.bcpub.com', LocalPort => 9050, Reuse
      > => 1)
      > -> dispatch_to('./backend/')
      > ;
      > print "Contact to SOAP server at ", $daemon->url, "\n";
      > $daemon->handle;
      >
      > now when I use an autodispatch on the client side, things like
      >
      > Hello->execute();
      >
      > work just fine. But when I do not use autodispatch on the client
      > side I get errors like
      >
      > Can't locate object method "execute" via package blah blah. It
      > doesn't
      > matter what I try, I always get the same result.
      >
      > use SOAP::Lite;
      >
      > my $soap = SOAP::Lite
      > -> proxy($self{'be_proxy'})
      > -> uri($self{'be_uri'});
      >
      > my $msg = $soap->Hello->execute()->result;
      >
      > doesn't work? This was my latest attempt. As you may notice
      > I want to be able to have a user choosen proxy/uri. Everything
      > worked with the autodispatch. Hmm maybe I will just call it
      > $self{'backend'}, instead of the proxy/uri since they go to the
      > same place.
      >
      > How do I get there from here? I've been looking at perldocs,
      > web stuff, examples, and have yet to find the answer. Even
      > tried require and eval(require) with an autodispatch to no
      > success. Please save my hair. :)
      >
      > Thanks,
      > Bryan


      __________________________________________________
      Do You Yahoo!?
      Make international calls for as low as $.04/minute with Yahoo! Messenger
      http://phonecard.yahoo.com/
    Your message has been successfully submitted and would be delivered to recipients shortly.