source: TI03-DataExtractor/trunk/dxc/scripts/exampleCLClient3.py @ 1153

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI03-DataExtractor/trunk/dxc/scripts/exampleCLClient3.py@1153
Revision 1153, 1.6 KB checked in by astephen, 14 years ago (diff)

Latest version with javascript select all in the GUI, date/time
javascript checking (needs onsubmit), cleaned up selection by domain.

  • Property svn:executable set to *
RevLine 
[794]1#!/usr/bin/env python
2import sys
[1153]3sys.path=sys.path+["..","scripts","../..",".", "../../pydxc"]
[794]4
[1153]5print "Testing CSML hooks...\n"
[794]6
[1109]7#import readline
[794]8from ZSI.client import Binding
9from pydxc.common import *
[1109]10from pydxc.clientConfig import SOAP_SERVER_URL
[794]11
12# start session
[1109]13server = Binding(url=SOAP_SERVER_URL)
14(sessionID, secureToken)=server.startSession("jane", "jane1")[0]
[1153]15print sessionID
[794]16
[1153]17print "\nsummary"
18print server.summariseRequest(sessionID, secureToken)
[794]19
[1153]20print "\noptions"
21print server.getOptions(sessionID, secureToken)
22print sessionID
[794]23
[1153]24print "\ndsg selected, ds options..."
25print server.selectOptions(sessionID, [["secureToken",secureToken], ["datasetGroup_1",'CSML test dataset group']])
[794]26
[1153]27print "\nds selected, var options..."
28print server.selectOptions(sessionID, [["secureToken",secureToken], ["dataset_1.1",'CSML test dataset great test']])
[794]29
[1153]30print "\nvar selected, domain options..."
31print server.selectOptions(sessionID, [["secureToken",secureToken], ["variable_1.1.1","pqn"]])
[794]32
[1153]33print "\ndomain selected, format options..." 
34print server.selectOptions(sessionID, [["secureToken",secureToken], ["axis_1.1.1.1",[[2006,05,15,12,0,0],[2006,06,15,12,0,0]]], ["axis_1.1.1.2", [20,50]]])
35
36print "\nformat selected, remaining options...?"
37print server.selectOptions(sessionID, [["secureToken",secureToken], ["outputFormat_1.1.1", "NetCDF"]])
38print sessionID
39print "\ncomplete"
[794]40print server.isComplete(sessionID, secureToken)
[1153]41
42print "\noutput"
[794]43x=server.createOutput(sessionID, secureToken)
[1153]44
[794]45print x
[1153]46x=deUnicodeObject(x[0][0][0][0][0])
[794]47
[1153]48print "\n", x
49print "\nOutput file is:", x.replace(OUTPUT_DIR_URL_PATH, OUTPUT_DIR_LOCAL_PATH)
50
Note: See TracBrowser for help on using the repository browser.