Python WS toolkit

Tamas Budavari budavari at pha.jhu.edu
Wed Apr 14 13:24:54 PDT 2004


FYI, the new ZSI module for Python 2+ has a wsdl2py tool that I
successfully ran on the NED name resolver's WSDL file as a test
to generate the client side code: a module called NED_services. 
BTW, the NED wrapper WS written in C# is here:

	http://voservices.net/ned

These few lines below invoke the WS and print out RA, Dec for
Messier 101 for a start:

<code lang="py">
from NED_services import *
ned = NEDLocator().getNEDSoap()
#--- build soap message
request = ObjByNameSoapInWrapper()
request._objname = "Messier 101"
#--- make a remote call
response = ned.ObjByName(request)
print response._ObjByNameResult._ra, response._ObjByNameResult._dec
</code>

Okay, so it's not as pretty as C# but close to Java ;-)
BTW, it took me 10 minutes to build this from scratch 
including the installation.

Cheers, T.

--
Tamas Budavari

Dept. of Physics and Astronomy       
The Johns Hopkins University         
3400 N. Charles Street 
Baltimore, MD 21218                    
Phone: +1 (410) 516-0643
Fax: +1 (410) 516-5096
http://www.sdss.jhu.edu/~budavari



More information about the grid mailing list