如何使用suds python识别方法中的多个值

时间:2014-01-07 05:23:50

标签: python soap wsdl suds

您好如何在特定方法中识别多个值。例如,我的方法将采用两个值来发送一些余额(例如:金额和帐号)。我做了一个值,如果方法有多个值,我会收到错误

   url='http://www.testfire.net/bank/ws.asmx?WSDL'
   client = Client(url)
   print client
   for method in client.wsdl.services[0].ports[0].methods.values():
        print "the existing methods in webservice are:"       +method.name                                        
   while True:
    try:
       s = raw_input("Enter the name of the method you want to scan: ")
       name= getattr(client.service,s)
       break 
    except suds.MethodNotFound as e:
        print "Please enter a valid method."
   value=raw_input("enter a value for method: ")
   result=name(value)
   print result

请提供建议

0 个答案:

没有答案