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

1613Re: Can the server process parameters by name?

Expand Messages
  • One4K4
    Jun 13, 2002
      FYI: You need:

      package Foo;
      @Foo::ISA = 'SOAP::Server::Parameters';

      At the top of your package declration. *If* you're dynamically/non-
      statically dispatching.

      -Tom

      --- In soaplite@y..., "One4K4" <one4k4@y...> wrote:
      > From the SOAP::Lite pod docs:
      > ------------------------------------------------------
      > Every method on server side will be called as class/object method,
      so
      > it will get an object reference or a class name as the first
      > parameter, then the method parameters, and then an envelope as
      > SOAP::SOM object. Shortly:
      >
      > $self [, @parameters] , $envelope
      >
      > If you have a fixed number of parameters, you can do:
      >
      > my $self = shift;
      > my($param1, $param2) = @_;
      >
      > and ignore the envelope. If you need access to the envelope you can
      > do:
      >
      > my $envelope = pop;
      >
      > since the envelope is always the last element in the parameters
      list.
      > The byname() method pop->method will return a hash with parameter
      > names as hash keys and parameter values as hash values:
      >
      > my($a, $b, $c) = @{pop->method}{qw(a b c)};
      >
      > gives you by-name access to your parameters.
      > ------------------------------------------------------
      >
      > my($a, $b, $c) = @{pop->method}{qw(a b c)};
      > I've tried that... but for some reason there is *no envelope* at
      the
      > end of @_ ?!
      >
      > -Tom
      >
      >
      > --- In soaplite@y..., "Chris Davies" <Chris.Davies@M...> wrote:
      > > I'm using a SOAP::Lite server with version 0.46 of SOAP::Lite.
      > >
      > > My colleagues in a.n.other company want to use named parameters
      > (rather than
      > > positional ones) to talk to my SOAP::Lite server. They are using
      > MS .NET,
      > > and we're around most of the interoperability issues now. Is it
      > easy for a
      > > SOAP::Lite server to handle named parameters, and if so how do I
      > approach
      > > the problem?
      > >
      > > Thanks,
      > > Chris
      > > --
      > > Chris Davies, Manheim Interactive (Europe)
      > > Tel. 0870 444-0450 Fax. 0870 444-0482 Email. MOL@M...
    • Show all 26 messages in this topic