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

2885Re: [soaplite] This is killing me !

Expand Messages
  • Duncan Cameron
    Aug 1, 2003
    • 0 Attachment
      On 2003-08-01 22:06:00 ddiiddoo2000 <doron.ido@...> wrote:

      > For several days now I'v been trying to make this work, still
      >I tryed any combination I could think of, of the 3 components that
      >seems to have impact on the connectivity between the dispatcher, the
      >module that contains the services and the client:
      >dispatch_to , proxy and uri.
      > I keep getting an error msg that says:
      >Failed to access class (callexpert::doron::Test): Can't locate
      >callexpert/doron/Test.pm in @INC (@INC
      >contains: /callexpert/doron/Test) at (eval 134) line 3.
      > So here is my question:
      >What should I put in those 3 variables if I'm running a soap daemon
      >server called test_WS_server.pl located in /callexpert/doron/
      >and calling a function called test in Test.pm located in the same
      >currently it looks like this :
      >in the client:
      >$host = "http://tti-ce:18885/callexpert/doron/test_WS_server.pl";
      >$ns = '/callexpert/doron/Test';
      >my $soap = SOAP::Lite
      > ->readable(1)
      > ->uri($ns)
      > ->proxy($host);
      >in the server:
      > my $daemon = SOAP::Transport::HTTP::Daemon
      > -> new (LocalPort => 18885)
      > -> dispatch_to('/callexpert/doron/Test')
      > ;

      Assuming that your file Test.pm contains a package called simply Test, and
      not something like Foo::Bar::Test, then this should work:

      in the client:
      $host = "http://tti-ce:18885";
      $ns = 'urn:Test';
      my $soap = SOAP::Lite

      in the server:
      my $daemon = SOAP::Transport::HTTP::Daemon
      -> new (LocalPort => 18885)
      -> dispatch_to('/callexpert/doron')

      Note that the client doesn't need to know the path of the server daemon, just
      the server name and port number. The uri() gives in effect the package name.
      The dispatch_to() gives, in this example, the path to the directory. This will
      provide access by the server to all modules in the specified directory.

    • Show all 2 messages in this topic