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

Re: [soaplite] xmlrpc::lite

Expand Messages
  • Paul Kulchenko
    Hi, jmiremo! ... this should work. Paradigm is simple: you pass parameters as you usually do it with Perl. First parameter is class/object. sub methodName {
    Message 1 of 3 , Aug 15, 2001
    • 0 Attachment
      Hi, jmiremo!

      > I would like to print out the var "a" after "hello" in the server
      > code. It should print "123", but I can't figure out the syntax to
      > get
      > a print statement to work. I know this is simple, but I am just
      > getting started. Thanks for any help.

      this should work. Paradigm is simple: you pass parameters as you
      usually do it with Perl. First parameter is class/object.

      sub methodName
      {
      my($class, $hash) = @_;
      print $hash->{a}, " hello\n";
      return 999;
      }

      Best wishes, Paul.

      --- jmiremo@... wrote:
      > I have this client:
      >
      > #!/usr/local/ActivePerl-5.6/bin/perl
      >
      > use XMLRPC::Lite;
      >
      > print XMLRPC::Lite
      > -> proxy('http://192.168.1.60/RPC2')
      > -> call('methodName', {a => 123})
      > -> result;
      >
      > -----------------------------------------------------------
      > and this server:
      >
      > #!c:/perl/bin/perl.exe
      >
      > use XMLRPC::Transport::HTTP;
      >
      > my $daemon = XMLRPC::Transport::HTTP::Daemon
      > -> new (LocalPort => 80)
      > -> dispatch_to('methodName')
      > ;
      >
      > print "Contact to XMLRPC server at ", $daemon->url, "\n";
      > $daemon->handle;
      >
      > sub methodName
      > {
      > print "hello\n";
      > return 999;
      > }
      >
      >
      > ------------------
      >
      > I would like to print out the var "a" after "hello" in the server
      > code. It should print "123", but I can't figure out the syntax to
      > get
      > a print statement to work. I know this is simple, but I am just
      > getting started. Thanks for any help.
      >
      >
      > ------------------------ Yahoo! Groups Sponsor
      >
      > 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/
      >
      >


      __________________________________________________
      Do You Yahoo!?
      Make international calls for as low as $.04/minute with Yahoo! Messenger
      http://phonecard.yahoo.com/
    • jmiremo@sf-megachips.com
      Thanks Paul for the very quick and helpfull response. Now I can sleep tonight and move on to the next snag I am sure to find my self in soon enough. ...
      Message 2 of 3 , Aug 15, 2001
      • 0 Attachment
        Thanks Paul for the very quick and helpfull response. Now I can sleep
        tonight and move on to the next snag I am sure to find my self in
        soon enough.

        :)

        --- In soaplite@y..., Paul Kulchenko <paulclinger@y...> wrote:
        > Hi, jmiremo!
        >
        > > I would like to print out the var "a" after "hello" in the server
        > > code. It should print "123", but I can't figure out the syntax to
        > > get
        > > a print statement to work. I know this is simple, but I am just
        > > getting started. Thanks for any help.
        >
        > this should work. Paradigm is simple: you pass parameters as you
        > usually do it with Perl. First parameter is class/object.
        >
        > sub methodName
        > {
        > my($class, $hash) = @_;
        > print $hash->{a}, " hello\n";
        > return 999;
        > }
        >
        > Best wishes, Paul.
        >
        > --- jmiremo@s... wrote:
        > > I have this client:
        > >
        > > #!/usr/local/ActivePerl-5.6/bin/perl
        > >
        > > use XMLRPC::Lite;
        > >
        > > print XMLRPC::Lite
        > > -> proxy('http://192.168.1.60/RPC2')
        > > -> call('methodName', {a => 123})
        > > -> result;
        > >
        > > -----------------------------------------------------------
        > > and this server:
        > >
        > > #!c:/perl/bin/perl.exe
        > >
        > > use XMLRPC::Transport::HTTP;
        > >
        > > my $daemon = XMLRPC::Transport::HTTP::Daemon
        > > -> new (LocalPort => 80)
        > > -> dispatch_to('methodName')
        > > ;
        > >
        > > print "Contact to XMLRPC server at ", $daemon->url, "\n";
        > > $daemon->handle;
        > >
        > > sub methodName
        > > {
        > > print "hello\n";
        > > return 999;
        > > }
        > >
        > >
        > > ------------------
        > >
        > > I would like to print out the var "a" after "hello" in the server
        > > code. It should print "123", but I can't figure out the syntax to
        > > get
        > > a print statement to work. I know this is simple, but I am just
        > > getting started. Thanks for any help.
        > >
        > >
        > > ------------------------ Yahoo! Groups Sponsor
        > >
        > > To unsubscribe from this group, send an email to:
        > > soaplite-unsubscribe@y...
        > >
        > >
        > >
        > > Your use of Yahoo! Groups is subject to
        > > http://docs.yahoo.com/info/terms/
        > >
        > >
        >
        >
        > __________________________________________________
        > Do You Yahoo!?
        > Make international calls for as low as $.04/minute with Yahoo!
        Messenger
        > http://phonecard.yahoo.com/
      Your message has been successfully submitted and would be delivered to recipients shortly.