home *** CD-ROM | disk | FTP | other *** search
/ PC World 2002 May / PCWorld_2002-05_cd.bin / Software / TemaCD / activetcltk / ActiveTcl8.3.4.1-8.win32-ix86.exe / ActiveTcl8.3.4.1-win32-ix86 / demos / TclSOAP / cgi-clients.tcl < prev    next >
Encoding:
Text File  |  2001-10-22  |  2.2 KB  |  55 lines

  1. # cgi-clients.tcl - Copyright (C) 2001 Pat Thoyts <Pat.Thoyts@bigfoot.com>
  2. #
  3. # Construct the client commands for my CGI samples.
  4. #
  5. # If you live behind a firewall and have an authenticating proxy web server
  6. # try executing SOAP::proxyconfig and filling in the fields. This sets
  7. # up the SOAP package to send the correct headers for the proxy to 
  8. # forward the packets (provided it is using the `Basic' encoding scheme).
  9. #
  10. # -------------------------------------------------------------------------
  11. # This software is distributed in the hope that it will be useful, but
  12. # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
  13. # or FITNESS FOR A PARTICULAR PURPOSE.  See the accompanying file `LICENSE'
  14. # for more details.
  15. # -------------------------------------------------------------------------
  16. #
  17. # @(#)$Id: cgi-clients.tcl,v 1.1 2001/08/03 21:47:40 patthoyts Exp $
  18.  
  19. package require SOAP
  20. package require XMLRPC
  21.  
  22. # -------------------------------------------------------------------------
  23.  
  24. # Some of my simple cgi test services.
  25.  
  26. proc define_sample_clients {proxy} {
  27.     set uri    "urn:tclsoap-Test"
  28.     set action "urn:tclsoap-Test"
  29.     
  30.     SOAP::create rpctime -uri $uri -name time -action $action -proxy $proxy \
  31.             -params {}
  32.     SOAP::create square  -uri $uri -action $action -proxy $proxy \
  33.             -params {num double}
  34.     SOAP::create sum  -uri $uri -action $action -proxy $proxy \
  35.             -params {lhs double rhs double}
  36.     SOAP::create platform -uri $uri -action $action -proxy $proxy -params {}
  37.     SOAP::create printenv -uri $uri -action $action -proxy $proxy -params {}
  38.     SOAP::create mistake  -uri $uri -action $action -proxy $proxy -params {}
  39.  
  40.     XMLRPC::create tclsoap.rpctime -proxy $proxy -params {}
  41.     XMLRPC::create tclsoap.square -proxy $proxy -params {num double}
  42.     XMLRPC::create tclsoap.sum -proxy $proxy  \
  43.             -params {lhs double rhs double}
  44.     XMLRPC::create tclsoap.platform -proxy $proxy -params {}
  45.     XMLRPC::create tclsoap.printenv -proxy $proxy -params {}
  46.     XMLRPC::create tclsoap.mistake -proxy $proxy -params {}
  47. }
  48.  
  49. define_sample_clients http://localhost/cgi-bin/rpc
  50.  
  51. # -------------------------------------------------------------------------
  52.  
  53. # Local variables:
  54. #   indent-tabs-mode: nil
  55. # End: