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

Re: Passing parameters between SOAP::Lite and MS .NET

Expand Messages
  • Erica Amemiya
    Hi, I think I figured out a solution to my problem. It s not as elegant as I would have liked, but I understand why it has to be that way. I ll post sample
    Message 1 of 3 , Apr 29, 2004
    • 0 Attachment
      Hi,

      I think I figured out a solution to my problem. It's not as elegant as I
      would have liked, but I understand why it has to be that way.

      I'll post sample code tomorrow.

      Erica

      At 08:02 PM 4/29/04, Erica Amemiya wrote:
      >(snip)
    • Erica Amemiya
      Hi, Here s how I m extracting named parameters from a MS .NET client. It should work just as well with a SOAP::Lite client sending a hash. package server; use
      Message 2 of 3 , Apr 30, 2004
      • 0 Attachment
        Hi,

        Here's how I'm extracting named parameters from a MS .NET client. It
        should work just as well with a SOAP::Lite client sending a hash.

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

        sub getparams {
        my (@p) = @_;
        my %p;
        if(ref(my $e = $p[scalar(@p)-1]) eq "SOAP::SOM") {
        my $n = $e->method();
        %p = %$n;
        } else {
        %p = (@p);
        }
        return(%p);
        }

        sub foo {
        my $self = shift;
        my %p = getparams(@_);
        my @p;

        foreach(keys(%p)) {
        push(@p, SOAP::Data->name($_)->value($p{$_}));
        }
        return(
        @p,
        SOAP::Data->name("arg1")->value("hello"),
        SOAP::Data->name("arg2")->value("from"),
        SOAP::Data->name("arg3")->value("foo"),
        );
        }

        Erica


        At 02:14 AM 4/30/04, Erica Amemiya wrote:
        >Hi,
        >
        >I think I figured out a solution to my problem. It's not as elegant as I
        >would have liked, but I understand why it has to be that way.
        >
        >I'll post sample code tomorrow.
        >
        >Erica
        >
        >At 08:02 PM 4/29/04, Erica Amemiya wrote:
        >>(snip)
      Your message has been successfully submitted and would be delivered to recipients shortly.