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

daemon server dispatch_to problem

Expand Messages
  • Gary Shea
    I ve successfully written a simple SOAP::Lite client to an Axis server, fairly painless. Now I m trying to write a functional test for that client by kicking
    Message 1 of 2 , Feb 16, 2005
    • 0 Attachment
      I've successfully written a simple SOAP::Lite client to an Axis server,
      fairly painless. Now I'm trying to write a functional test for that
      client by kicking off a SOAP server and verifying that the client
      contacts it, makes the right query, etc. The server doesn't seem to be
      paying any attention to my dispatch_to arguments.

      perl5.8.5 (with ithreads, installed from src on a Linux box)
      MIME::Parser 5.417
      SOAP::Lite 0.60

      I have been unable to get a clean install of SOAP::Lite (any version,
      including 0.65x) but it seems to pretty much work. I wonder if
      MIME-tools doesn't like ithreads? Also, Axis support calls for a
      version of MIME-Tools which I have been unable to find anywhere. Very
      strange. I did find 6.200 but it wouldn't build properly either.

      I've been hacking around in the code and so far it appears that the
      dispatch_to method default of sub {return} is never being replaced with
      something more... useful ;) However, I'm somewhat baffled by the code
      and haven't figured out where a more useful version of dispatch_to would
      come from.

      $self->{'daemon'} = SOAP::Transport::HTTP::Daemon
      ->new(LocalAddr => 'localhost', LocalPort => 9191)
      ->dispatch_to('ws::handlers::authenticate');
      print "SOAP server (pid=$$) started at ",
      $self->{'daemon'}->url, "\n";
      $self->{'daemon'}->handle();

      The ws::handlers package is in the same file; the authenticate method is
      never called. Instead I get the

      "Failed to locate method ($method_name) in class ($class)"

      error in SOAP::Server::handler where $method_name is 'authenticate', as
      it should be, but $class == 'main'

      I could use a hint :)

      Thanks,

      Gary
    • Juan Jose Natera Abreu
      Hi, ... I feel you, most of the time I can dissect a module just fine, but SOAP::Lite s style doesn t help. ... AFAIK, you can dispatch to a path, a module, or
      Message 2 of 2 , Feb 16, 2005
      • 0 Attachment
        Hi,

        > I've been hacking around in the code and so far it appears that the
        > dispatch_to method default of sub {return} is never being replaced with
        > something more... useful ;) However, I'm somewhat baffled by the code

        I feel you, most of the time I can dissect a module just fine, but
        SOAP::Lite's style doesn't help.

        > and haven't figured out where a more useful version of dispatch_to would
        > come from.
        >
        > $self->{'daemon'} = SOAP::Transport::HTTP::Daemon
        > ->new(LocalAddr => 'localhost', LocalPort => 9191)
        > ->dispatch_to('ws::handlers::authenticate');
        > print "SOAP server (pid=$$) started at ",
        > $self->{'daemon'}->url, "\n";
        > $self->{'daemon'}->handle();
        >
        > The ws::handlers package is in the same file; the authenticate method is
        > never called. Instead I get the

        AFAIK, you can dispatch to a path, a module, or a mix of both, but not
        to a method, try dispatch_to('ws::handlers'),

        --
        Juan Jose Natera Abreu <juanjose@...>
      Your message has been successfully submitted and would be delivered to recipients shortly.