Mercurial > repos > uga-galaxy-group > webservice_toolsuite_v1_1
diff WebServiceExtensionsV1.1/WebServiceToolWorkflow_REST_SOAP/clientGenerator/creatorTest.py~ @ 0:049760c677de default tip
Galaxy WSExtensions added successfully
author | uga-galaxy-group |
---|---|
date | Tue, 05 Jul 2011 19:34:18 -0400 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/WebServiceExtensionsV1.1/WebServiceToolWorkflow_REST_SOAP/clientGenerator/creatorTest.py~ Tue Jul 05 19:34:18 2011 -0400 @@ -0,0 +1,40 @@ +from creatorEngineComplex import * +from wsdl2path import * + + +if __name__=="__main__": +# filename='testforrindex.py' +# print filename[0:filename.rindex('.py')] + + test1=wsdlLoader() + print 'stub file path generated by wsdl2py: \n', test1.wsdlUrl2path('http://webservices.daehosting.com/services/TemperatureConversions.wso?WSDL', 'Temp') + +## print 'stub file path generated by wsdl2py: \n', test1.wsdlUrl2path('http://www.ebi.ac.uk/Tools/webservices/wsdl/WSDbfetch.wsdl', 'dbfetch') + # print 'stub file path generated by wsdl2py: \n', test1.wsdlFile2path('../wsdl/WSDbfetch.wsdl', 'dbfetch') + + test=ClientCreator() + +## print 'all operations: \n', test.path2Ops('dbfetch.WSDBFetchServerLegacyService_client').keys() +## print 'inputs of fetchData:\n', test.opname2inputs('fetchData', 'dbfetch.WSDBFetchServerLegacyService_client') +## inputDict={'_format':'fasta', '_query':'UNIPROT:ADH1A_HUMAN', '_style':'raw'} +## print 'invoke the fetchData operation of web service and return: \n',test.invokeOp('fetchData', 'dbfetch.WSDBFetchServerLegacyService_client', inputDict) + print 'all operations: \n', test.path2Ops('Temp.TemperatureConversions_client').keys() + print 'inputs of fetchData:\n', test.opname2inputs('WindChillInCelcius', 'Temp.TemperatureConversions_client') + inputDict={'_nWindSpeed': 90, '_nCelcius': 40} + print 'invoke the fetchData operation of web service and return: \n', + result=test.invokeOp('WindChillInCelcius', 'Temp.TemperatureConversions_client', inputDict) + for r in result: + print r,':',result[r] +## +# print 'all operations of wublast: \n', test.path2Ops('blast.WSWUBlast_client').keys() +# print 'inputs of runWUBlast operation \n', test.opname2inputs('runWUBlast', 'blast.WSWUBlast_client') +# print 'outputs of runWUBlast operation \n', test.opname2outputs('runWUBlast', 'blast.WSWUBlast_client') +# +# seq = """>Q8E5Q5_STRA3 +# MKLSKRYRFWQKVIKALGVLALIATLVLVVYLYKLGILNDSNELKDLVHKYEFWGPMIFI +# VAQIVQIVFPVIPGGVTTVAGFLIFGPTLGFIYNYIGIIIGSVILFWLVKFYGRKFVLLF +# MDQKTFDKYESKLETSGYEKFFIFCMASPISPADIMVMITGLSNMSIKRFVTIIMITKPI +# SIIGYSYLWIYGGDILKNFLN""" +# inputDict={'_params':{ '_program' : 'blastp', '_database' :'swissprot', '_email' :'riververy@yahoo.com', '_async': 1}, '_content':[{'_type':'sequence', '_content':seq}]} +# print 'invoke runWUBlast operation and return: \n', test.invokeOp('runWUBlast', 'blast.WSWUBlast_client', inputDict) + \ No newline at end of file