Jiboia Source Code

#!/usr/bin/python

#
# Examples to show how to use the EchoSoapProxy class to access the Echo
#
# $Id: GetTestFacility.py,v 1.1 2001/09/26 16:40:30 ian Exp $
#
import ECHO

FALSE = 0
SERVER_NAME = "http://api.echo.nasa.gov/echo/rmi/EchoTestFacility.jsp"
NAMESPACE = "urn:echo"
USER_NAME = "guest"
USER_PASSWORD = ""
XML_FILE="/home/vern/echo/query.xml"

# Test #1: Reads the XML, log into the Echo server and submit it
print 'Test #1: log\'ing into the Echo server and submitting query'
message = open(XML_FILE).read()
echo = ECHO.EchoSoapProxy(SERVER_NAME, NAMESPACE)
echo.login(USER_NAME, USER_PASSWORD)
response = echo.perform(message)
print 'Response is (its not formatted by the way): %s' % response
echo.logout()
print 'Test #1 finished successfully.\n'



vern 2006-10-25