ActiveState Code

Recipe 136604: Minimal SOAP


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
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

Comments

  1. 1. At 11:04 p.m. on 6 feb 2009, Anand Gupta said:

    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.

Sign in to comment