Welcome, guest | Sign In | My Account | Store | Cart

A minimal example setting up and using SOAP to call to a temperature conversion service. Uses http and TclSOAP. The latter can be found at http://tclsoap.sourceforge.net

Tcl, 8 lines
1
2
3
4
5
6
7
8
% package require SOAP
1.6
% SOAP::create c2f -uri http://www.soaplite.com/Temperature \
      -proxy http://services.soaplite.com/temper.cgi \
      -params { "temp" "float" }
::c2f
% c2f -40.0
24.8

1 comment

Anand Gupta 12 years, 10 months ago  # | flag

I had to specify uri as http://www.soaplite.com/Temperatures (note the plural form) to make the example work. I think the soaplite web site has changed since this example was originally provided.

Created by andreas kupries on Thu, 27 Jun 2002 (MIT)
Tcl recipes (162)
andreas kupries's recipes (20)

Required Modules

  • (none specified)

Other Information and Tasks