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

310Re: [soaplite] Can the server process parameters by name?

Expand Messages
  • Robert Barta
    May 11 12:45 PM
      Chris Davies wrote:
      >
      > Do I take it that everyone reckons it's a stupid requirement?

      I found this in my archive, maybe it helps:

      \rho

      -------------

      Paul Kulchenko wrote:

      ....

      Definitely. Put BEGIN {} block aroung package declaration:

      #!/usr/local/bin/perl

      use SOAP::Transport::HTTP;

      SOAP::Transport::HTTP::CGI
      -> dispatch_to('PARAMS')
      -> handle;

      BEGIN {

      package PARAMS;

      use vars qw(@ISA);
      @ISA = qw(SOAP::Server::Parameters);

      sub ParamsTest
      {
      my($a, $b, $c) = @{pop->method}{qw(a b c)};
      return "a=$a, b=$b, c=$c";
      }

      }

      Inheritance (@ISA) doesn't work unless you declare module BEFORE
      usage or put it in BEGIN block. Important ONLY if your package
      declaration is in the same file where you use it. Hope it helps.

      Best wishes, Paul.

      --- Larry Mulcahy <lmulcahy@...> wrote:
      > Hmm, it works when I rewrite my CGI script as a .pm module
      > and have my mod_perl SOAP::Apache module dynamically load it.
      > Is it possible to do this as a CGI script?
      >
      > Larry Mulcahy wrote:
      > >
      > > I'm also trying to get named parameters to work.
      > > After looking at
      > >
      >
      http://discuss.develop.com/archives/wa.exe?A2=ind0104&L=soap&F=&S=&P=11652
      > > as well as the code in examples/parametersbyname.pl and
      > > examples/My/Parameters.pm I thought I understood what to do.
      > > The two attached files show my client and server code.
      > > The client fails with the message:
      > >
      > > $ ./params-client.perl
      > > Can't call method "method" without a package or object reference
      > at
      > > /usr/local/apache/cgi-bin-open/params-server.perl line 17.
      > >
      > > What's wrong?!?!
      >
      > --
      > Larry Mulcahy lmulcahy@...
      > PGP public key at:
      > http://pgpkeys.mit.edu:11371/pks/lookup?op=get&search=0x2C4C5A03
      >
      > To unsubscribe from this group, send an email to:
      > soaplite-unsubscribe@yahoogroups.com
      >
      >
      >
      > Your use of Yahoo! Groups is subject to
      > http://docs.yahoo.com/info/terms/
      >
      >

      ------------------

      > -----Original Message-----
      > From: Chris Davies [mailto:Chris.Davies@...]
      > Sent: Monday, April 30, 2001 2:48 PM
      > To: SOAP Lite mailing list
      > Subject: RE: [soaplite] Can the server process parameters by name?
      >
      > Hi folks,
      > Is it reasonable to provide a procedure that can handle arguments supplied
      > either by name and by position? I can see one way of implementing this
      >
      > [...snip...]
      >
      > To unsubscribe from this group, send an email to:
      > soaplite-unsubscribe@yahoogroups.com
      >
      >
      >
      > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    • Show all 26 messages in this topic