Ignore:
Timestamp:
07/06/06 00:44:32 (13 years ago)
Author:
astephen
Message:

Stable-ish version with fully-ish working dxc client.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI03-DataExtractor/trunk/dxc/scripts/exampleCLClient2.py

    r794 r1109  
    33sys.path=sys.path+["..","scripts","../..",".", "../../pydxc"] 
    44 
    5 import readline 
     5#import readline 
    66from ZSI.client import Binding 
    7 from pydxc.clientConfig import SOAP_SERVER_PORT 
    87from pydxc.common import * 
     8from pydxc.clientConfig import SOAP_SERVER_URL 
     9# start session 
     10server = Binding(url=SOAP_SERVER_URL) 
     11(sessionID, secureToken)=server.startSession("jane", "jane1")[0] 
    912 
    10 # start session 
    11 server = Binding(url="", host="localhost", port=8406) 
    12 sessionID, secureToken=server.startSession("jane", "jane1") 
    1313server.getOptions(sessionID, secureToken) 
     14 
    1415print "dsg" 
    1516print server.selectOptions(sessionID, [["secureToken",secureToken], ["datasetGroup_1","Test Data Group 1"]]) 
     17 
    1618print "ds" 
    17 print server.selectOptions(sessionID, [["secureToken",secureToken], ["dataset_1","Test Dataset 1"]]) 
     19print server.selectOptions(sessionID, [["secureToken",secureToken], ["dataset_1.1","Test Dataset 1"]]) 
     20 
    1821print "v" 
    19 print server.selectOptions(sessionID, [["secureToken",secureToken], ["variable_1","pqn"]]) 
    20 print "horiz" 
    21 print server.selectOptions(sessionID, [["secureToken",secureToken], ["horizontalDomain",(90,0,0,90)]]) 
    22 print "vert" 
    23 print server.selectOptions(sessionID, [["secureToken",secureToken], ["verticalDomain_1",("Single level",)]]) 
    24 print "options" 
    25 print server.getOptions(sessionID, secureToken) 
    26 print "time"  
    27 print server.selectOptions(sessionID, [["secureToken",secureToken], ["temporalDomain_1",[[1999,1,1,0,0,0],[1999,1,1,0,0,0],[1., "hour"]]]]) 
     22print server.selectOptions(sessionID, [["secureToken",secureToken], ["variable_1.1.1","pqn"]]) 
     23 
     24print "domain" 
     25print server.selectOptions(sessionID, [["secureToken",secureToken],["axis_1.1.1.3",(0,90)], ["axis_1.1.1.2",(90,0)],  
     26                                        ["axis_1.1.1.1",[[1999,1,1,0,0,0],[1999,1,1,0,0,0]]]]) 
    2827print "format" 
    29 print server.selectOptions(sessionID, [["secureToken",secureToken], ["outputFormat", "NetCDF"]]) 
     28print server.selectOptions(sessionID, [["secureToken",secureToken], ["outputFormat_1.1.1", "NetCDF"]]) 
     29 
    3030print "complete" 
    3131print server.isComplete(sessionID, secureToken) 
     32 
     33 
    3234print "cost" 
    3335print server.getExtractionCosts(sessionID, secureToken) 
     36 
    3437print "output" 
    3538x=server.createOutput(sessionID, secureToken) 
     39 
    3640print x 
    37 x=deUnicodeObject(x[0][0][0]) 
     41x=deUnicodeObject(x[0][0][0][0][0]) 
    3842print "Output file is:", x.replace(OUTPUT_DIR_URL_PATH, OUTPUT_DIR_LOCAL_PATH) 
    3943 
Note: See TracChangeset for help on using the changeset viewer.