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

new group member / very silly question!

Expand Messages
  • Broadfoot, Kieran J
    Hi everyone, As Ive just starting having a play with soap::lite today I hoped you would not mind if I asked a couple of simple questions regarding the use of
    Message 1 of 2 , Jun 18, 2002
      Hi everyone,

      As Ive just starting having a play with soap::lite today I hoped you would
      not mind if I asked a couple of simple questions regarding the use of
      soap::lite. I took a look at the pods and sample code but couldnt find an
      answer to these questions. I am looking to write a distributed management
      system for our servers and soap::lite seems a good starting point for the
      communication side of things. heres the code:

      #!/opt/perl-5.6/bin/perl
      use SOAP::Transport::HTTP;

      $daemon = SOAP::Transport::HTTP::Daemon
      -> new (LocalPort => 80, Reuse => 1)
      -> dispatch_to('/home/broadk/soaptests');
      $daemon->handle;

      #!/opt/perl-5.6/bin/perl
      use SOAP::Lite;

      my $soap = SOAP::Lite
      -> uri($ARGV[0])
      -> proxy('http://servername.xx.xx.xxx/')
      -> main();
      print $soap->result(),"\n";

      The questions are these:

      i. If no uri is passed to the server from the client is there any way to
      have the server automatically use a perl module as default? i.e something
      that responds with a help message detailing available modules etc.

      ii. Can arguments be automatically passed as part of the uri? for instance
      if I wanted to make a call like: ./client.pl
      InstallPkg?machine=bob.xx.xx.xxx&pkg=perl is it feasible?

      iii. Whats the simplest way of determining what type of system the calling
      client is? i.e web browser, soap::lite client etc

      Thanks for taking the time to read my mail and apologies if there is already
      documentation on these topics. Any links would be helpful.

      Cheers
      kieran
    • Paul Kulchenko
      Hi, Kieran! ... you may put your functions in main package that should be used in this case. Or you can use dispatch_with() method and link your uri to any
      Message 2 of 2 , Jun 18, 2002
        Hi, Kieran!

        --- "Broadfoot, Kieran J" <kieran.broadfoot@...> wrote:
        > i. If no uri is passed to the server from the client is there any
        > way to
        > have the server automatically use a perl module as default? i.e
        > something
        > that responds with a help message detailing available modules etc.
        you may put your functions in "main" package that should be used in
        this case. Or you can use dispatch_with() method and link your uri to
        any package you want: ->dispatch_with({"" => 'My::Package'})

        > ii. Can arguments be automatically passed as part of the uri? for
        > instance
        > if I wanted to make a call like: ./client.pl
        > InstallPkg?machine=bob.xx.xx.xxx&pkg=perl is it feasible?
        no. It's not clear how to pass payload in this case.

        > iii. Whats the simplest way of determining what type of system the
        > calling
        > client is? i.e web browser, soap::lite client etc
        Check this link: http://www.xml.com/pub/a/2002/05/08/ws-easy.html
        This article may give you some ideas.

        Best wishes, Paul.


        __________________________________________________
        Do You Yahoo!?
        Yahoo! - Official partner of 2002 FIFA World Cup
        http://fifaworldcup.yahoo.com
      Your message has been successfully submitted and would be delivered to recipients shortly.