tclsoap and terraserver
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.tcl archive

tclsoap and terraserver

From: Ernie Ghiglione <ErnieG@ee.usyd.edu.au>
Date: Sun Jul 31 2005 - 10:47:21 CEST

Hi fellas,

I don't know if anyone of you would be interested by with a bit of help
from Chengye Mao, I managed to get tclsoap to use one of the terraserver
  webservices (http://terraserver-usa.com/TerraService2.asmx). So if
anyone is interested, here you go:

ernieg@bondi:~> tclsh
% package require SOAP
1.6.7
% package require rpcvar
1.2
% namespace import -force rpcvar::typedef
%
typedef {
    ns:Lon double
    ns:Lat double
} point
% point
%
% SOAP::create ConvertLonLatPtToNearestPlace \
        -uri "http://terraservice-usa.com/" \
        -name "ConvertLonLatPtToNearestPlace" \
        -proxy "http://terraserver-usa.com/TerraService2.asmx" \
        -action
"http://terraservice-usa.com/ConvertLonLatPtToNearestPlace" \
        -params {"ns:point" "point"}

::ConvertLonLatPtToNearestPlace
% %
% # Debugging
#SOAP::configure ConvertLonLatPtToNearestPlace -transport \
SOAP::Transport::print::print

# you don't need this if you aren't behind a proxy
SOAP::configure -transport http -proxy www-cache.usyd.edu.au:8080 % % % %
%
ConvertLonLatPtToNearestPlace {"ns:Lon" "146.97221374511719" "ns:Lat"
"-36.058612823486328"}
% Albury, New South Wales, Australia
%

The ConvertLonLatPtToNearestPlace does some sort of reverse geocoding,
that is given a pair of cordinates it tells returns the closest location
  to them.

Note that since this is a Microsoft web service we are calling, the
namespaces are reinforces, thus the ns: before the tags in point, Lat
and Lon.

Hope this might help. Thanks,

Ernie
Received on Thu Sep 29 14:28:05 2005