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

Several classes on one port (2)

Expand Messages
  • paulmasquelier <paulmasquelier@yahoo.com>
    phew replied on the previous mail : Yes. Check out the chapter called Service dispatch in http://guide.soaplite.com/ You can do: - dispatch_to( Class1 )
    Message 1 of 3 , Jan 13, 2003
      phew replied on the previous mail :

      "Yes. Check out the chapter called "Service dispatch" in
      http://guide.soaplite.com/

      You can do:

      ->dispatch_to('Class1') # STATIC
      (explicit)
      ->dispatch_to('/home/mydir/modules') # DYNAMIC
      (modules in the directory)
      ->dispatch_to('/home/mydir/modules', 'Class1', 'Class2') # MIXED
      (specified modules _only_ in directory)"

      (I suppose the urls with canada in it, where not typed manually and
      are not part of the solution)

      Thanks, but what do I do on the client side ?

      for only package TestCall1 I can use :
      $soaplite = SOAP::Lite->uri('http://www.foo.com/TestCall1' )->proxy
      ('tcp://localhost:82/'); # local tcp server

      but for 2 packages (TestCall1 and TestCall2), the following guess
      does not work :
      $soaplite = SOAP::Lite->uri
      ('http://www.foo.com' ,'TestCall1', 'TestCall2')->proxy
      ('tcp://localhost:82/'); # local tcp server

      The service dispatch chapter does not say what to do on the client
      side.

      Paul
    • Paul Kulchenko
      Hi Paul, ... I m confused. How can you call a method from two packages/classes? And why? The interface on server side just says: ok, allow all calls to Class1
      Message 2 of 3 , Jan 13, 2003
        Hi Paul,

        > but for 2 packages (TestCall1 and TestCall2), the following guess
        > does not work :
        > $soaplite = SOAP::Lite->uri
        > ('http://www.foo.com' ,'TestCall1', 'TestCall2')->proxy
        > ('tcp://localhost:82/'); # local tcp server
        >
        > The service dispatch chapter does not say what to do on the client
        > side.
        I'm confused. How can you call a method from two packages/classes?
        And why?

        The interface on server side just says: "ok, allow all calls to
        Class1 package and all call to Class2 package and some calls (names)
        to Class3 package". By default, the namespace of the first immediate
        child of Body element will be used to determine class/package that
        message has to be dispatched to; this can be reconfigured to dispatch
        you call to whatever you want.

        Best wishes, Paul.

        --- "paulmasquelier <paulmasquelier@...>"
        <paulmasquelier@...> wrote:
        > phew replied on the previous mail :
        >
        > "Yes. Check out the chapter called "Service dispatch" in
        > http://guide.soaplite.com/
        >
        > You can do:
        >
        > ->dispatch_to('Class1') # STATIC
        > (explicit)
        > ->dispatch_to('/home/mydir/modules') # DYNAMIC
        >
        > (modules in the directory)
        > ->dispatch_to('/home/mydir/modules', 'Class1', 'Class2') # MIXED
        > (specified modules _only_ in directory)"
        >
        > (I suppose the urls with canada in it, where not typed manually and
        >
        > are not part of the solution)
        >
        > Thanks, but what do I do on the client side ?
        >
        > for only package TestCall1 I can use :
        > $soaplite = SOAP::Lite->uri('http://www.foo.com/TestCall1' )->proxy
        > ('tcp://localhost:82/'); # local tcp server
        >
        > but for 2 packages (TestCall1 and TestCall2), the following guess
        > does not work :
        > $soaplite = SOAP::Lite->uri
        > ('http://www.foo.com' ,'TestCall1', 'TestCall2')->proxy
        > ('tcp://localhost:82/'); # local tcp server
        >
        > The service dispatch chapter does not say what to do on the client
        > side.
        >
        > Paul
        >
        >
        > ------------------------ 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! Mail Plus - Powerful. Affordable. Sign up now.
        http://mailplus.yahoo.com
      • fhew@canada.com
        On Mon, 13 Jan 2003 21:39:42 -0800 (PST), paulmasquelier wrote: phew replied on the previous mail :actually, its fhew
        Message 3 of 3 , Jan 13, 2003
          On Mon, 13 Jan 2003 21:39:42 -0800 (PST), "paulmasquelier <paulmasquelier@...>" wrote:

          >
          > phew replied on the previous mail :

          actually, its 'fhew'


          ... snip ...

          > (I suppose the urls with canada in it, where not typed manually and
          > are not part of the solution)

          No, Apparently the 'free email' service I had to use to sign up
          for the soaplite email list, re-writes URIs to point back
          to themselves. (nasty people!)

          > Thanks, but what do I do on the client side ?

          > but for 2 packages (TestCall1 and TestCall2), the following guess
          > does not work :
          > $soaplite = SOAP::Lite->uri
          > ('http://www.foo.com' ,'TestCall1', 'TestCall2')->proxy
          > ('tcp://localhost:82/'); # local tcp server
          >
          > The service dispatch chapter does not say what to do on the client
          > side.

          Ahh, I use the autodispatch technique and not the URI technique
          so in my Perl program I have stuff like:

          use SOAP::Lite
          +autodispatch =>
          uri => 'http://wecan.com/',
          proxy => 'tcp://localhost:2000', # local tcp server
          on_fault => sub { my($soap, $res) = @_;
          die ref $res ? $res->faultdetail : $soap->transport->status, "\n";
          };
          $obj1 = Class1::new();
          $obj2 = Class2::new()
          $obj1->func_from_class1();
          $obj2->func_from_class2();

          Then everything happens auto-magically! Cool!

          NOTE: Any URL in this email will probably get mangled by my
          mail service, sorry.

          __________________________________________________________
          Get your FREE personalized e-mail at http://www.canada.com
        Your message has been successfully submitted and would be delivered to recipients shortly.