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 *
Line 
1#!/usr/bin/env python
2import sys
3sys.path=sys.path+["..","scripts","../..",".", "../../pydxc"]
4
5print "Testing CSML hooks...\n"
6
7#import readline
8from ZSI.client import Binding
9from pydxc.common import *
10from pydxc.clientConfig import SOAP_SERVER_URL
11
12# start session
13server = Binding(url=SOAP_SERVER_URL)
14(sessionID, secureToken)=server.startSession("jane", "jane1")[0]
15print sessionID
16
17print "\nsummary"
18print server.summariseRequest(sessionID, secureToken)
19
20print "\noptions"
21print server.getOptions(sessionID, secureToken)
22print sessionID
23
24print "\ndsg selected, ds options..."
25print server.selectOptions(sessionID, [["secureToken",secureToken], ["datasetGroup_1",'CSML test dataset group']])
26
27print "\nds selected, var options..."
28print server.selectOptions(sessionID, [["secureToken",secureToken], ["dataset_1.1",'CSML test dataset great test']])
29
30print "\nvar selected, domain options..."
31print server.selectOptions(sessionID, [["secureToken",secureToken], ["variable_1.1.1","pqn"]])
32
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"
40print server.isComplete(sessionID, secureToken)
41
42print "\noutput"
43x=server.createOutput(sessionID, secureToken)
44
45print x
46x=deUnicodeObject(x[0][0][0][0][0])
47
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.