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

5980Dispatch to a class with a different name

Expand Messages
  • thomas.lochmatter
    Jul 1 4:25 AM
    • 0 Attachment
      In all SOAP::Lite examples I've seen, the class name was derived from the URL, e.g. When
      print SOAP::Lite
      -> proxy('http://services.soaplite.com/hibye.cgi')
      -> uri('http://www.soaplite.com/Demo')
      -> hi()
      -> result;
      the method hi() of the class "Demo" is invoked.

      Is there a way to configure SOAP::Lite to dispatch such requests to another class? E.g.
      $server->dispatch_to({'Demo' => 'SomeClass'});
      or even better
      $server->dispatch_to({'Demo' => $someInitializedObjectOfMyClass});
      or at least
      $server->dispatch_to({'Demo' => 'MyNamespace::Demo'});

      I'm having this problem in a project with several hundred classes where each part of the
      project lives in its own namespace. Hence all SOAP classes are supposed to be in some
      "ProjectNameAndVersion::SOAP::*" namespace.

    • Show all 2 messages in this topic