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

Re: tclsoap and terraserver

From: <chengye.geo@yahoo.com>
Date: Sun Jul 31 2005 - 17:09:38 CEST

Ernie,

Thanks for posting your testing results. Glad to see your success to
access to the terraserver with SOAP.

Have you tried to build a point type without using ns: before Lon and
Lat? If ns: is required for Lat and Lon, it could also be required by
other data types for using TclSOAP. It could be a bug or an
undocumented restriction in TclSOAP in building the requested XML since
the TerraServer's spec does not require this.

Chengye

Ernie Ghiglione wrote:
> 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:07 2005