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

grabbing function-call parameters

Expand Messages
  • Orlando Andico
    it s real easy to grab function-call parameters via SOAP::Lite: sub my_method { my ($class, $param1, $param2, $param3..) = @_; # blah blah } however: what if i
    Message 1 of 2 , Jul 15, 2003
      it's real easy to grab function-call parameters via SOAP::Lite:

      sub my_method {
      my ($class, $param1, $param2, $param3..) = @_;
      # blah blah
      }

      however: what if i want to retrieve the parameters *by name* ? that
      way some random .NET client can call me and the parameter order is no
      longer significant?

      me calling .NET is easier..
      my $method = SOAP::Data->name("SendSMSRequest")
      ->attr({xmlns => $uri});
      my @params = (
      SOAP::Data->new(name => "Telno", value => "+639175315893",
      type => "xsi:string"),
      SOAP::Data->new(name => "ShortMessage", value => "hello there
      bunghole!", type => "xsi:string"),
      SOAP::Data->new(name => "Label", value => "advisory message",
      type => "xsi:string")
      );
      my $som = $soap->call($method => @params);

      i guess i want to know how to do the reverse (SOAP::Lite server
      instead of SOAP::Lite client)
    • Byrne Reese
      The trick is in subclassing SOAP::Server::Parameters. Here are two articles that will take you through the process of creating a server as you described:
      Message 2 of 2 , Jul 15, 2003
        The trick is in subclassing SOAP::Server::Parameters. Here are two articles that will take you through the process of creating a server as you described:
         
         
        -----Original Message-----
        From: Orlando Andico [mailto:orly_andico@...]
        Sent: Tuesday, July 15, 2003 2:03 AM
        To: soaplite@yahoogroups.com
        Subject: [soaplite] grabbing function-call parameters

        it's real easy to grab function-call parameters via SOAP::Lite:

        sub my_method {
        my ($class, $param1, $param2, $param3..) = @_;
        # blah blah
        }

        however: what if i want to retrieve the parameters *by name* ? that
        way some random .NET client can call me and the parameter order is no
        longer significant?

        me calling .NET is easier..
        my $method = SOAP::Data->name("SendSMSRequest")
                ->attr({xmlns => $uri});
        my @params = (
                SOAP::Data->new(name => "Telno", value => "+639175315893",
        type => "xsi:string"),
                SOAP::Data->new(name => "ShortMessage", value => "hello there
        bunghole!", type => "xsi:string"),
                SOAP::Data->new(name => "Label", value => "advisory message",
        type => "xsi:string")
        );
        my $som = $soap->call($method => @params);

        i guess i want to know how to do the reverse (SOAP::Lite server
        instead of SOAP::Lite client)



        To unsubscribe from this group, send an email to:
        soaplite-unsubscribe@yahoogroups.com



        Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
      Your message has been successfully submitted and would be delivered to recipients shortly.