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

Help with dispatch_with()

Expand Messages
  • Chris
    Hi, I m trying to move a working Apache.pm installation that uses dispatch_to() to use dispatch_with(). I m trying to clean up my package s namespaces, and was
    Message 1 of 2 , Jul 22, 2002
    • 0 Attachment
      Hi,

      I'm trying to move a working Apache.pm installation that uses dispatch_to()
      to use dispatch_with(). I'm trying to clean up my package's namespaces, and
      was hoping that using dispatch_with() would allow me to do so without
      changing the URL scheme published to my clients. We don't use WSDL because
      the client doesn't support it, so maintaining compatibility is a large
      issue. I was wondering if there was some kind of a catch here?

      ---
      Old (working) version:

      use lib $dir; # $dir = '/path/to/My/SOAP/';
      use My::SOAP::Login;
      use My::SOAP::Settings;
      use My::SOAP::Admin;
      use My::SOAP::Files;

      use SOAP::Transport::HTTP;

      my $server = SOAP::Transport::HTTP::Apache
      ->dispatch_to($dir, Login, Settings, Files, Admin);

      sub handler {$server->handler(@_) }
      ---

      The only problem I have is although I've placed the Packages into /My/SOAP
      the package Names have to be Login|Settings|Files|Admin else the URL scheme
      will change. I was hoping I could go with the following, but it doesn't
      even seem to call the package.

      ---
      New (non-working) Version:

      use My::SOAP::Login;
      use My::SOAP::Settings;
      use My::SOAP::Admin;
      use My::SOAP::Files;

      use SOAP::Transport::HTTP;

      my $server = SOAP::Transport::HTTP::Apache

      ->dispatch_with({
      "http://$url/Login"=>My::SOAP::Login,
      "http://$url/Files"=>My::SOAP::Files,
      "http://$url/Settings"=>My:SOAP::Settings,
      "http://$url/Admin"=>My::SOAP::Admin,
      })

      ->options({compress_threshold=>10000});

      sub handler {$server->handler(@_) }
      ---

      I've spent alot of time worrying over the mod_perl bits of my app, and left
      the SOAP bits because they've generally been working, but I'm trying to
      clean some stuff up overall and this is one step in that process. Any help
      would be appreciated.

      -Chris
      --
      "[A] Genuinely skillful use of obscenities is uniformly absent on the
      Internet." -Karl Kleinpaste
    • Chris
      Hmm figured it out. Was a combined issue where I wasn t dispatching to the proper URL, and wasn t setting my @INC properly. My apologies. Thanks. -Chris --
      Message 2 of 2 , Jul 22, 2002
      • 0 Attachment
        Hmm figured it out. Was a combined issue where I wasn't dispatching to the
        proper URL, and wasn't setting my @INC properly. My apologies. Thanks.

        -Chris
        --
        "[A] Genuinely skillful use of obscenities is uniformly absent on the
        Internet." -Karl Kleinpaste
      Your message has been successfully submitted and would be delivered to recipients shortly.