标签:
Ladon
from ladon.ladonizer import ladonize from ladon.types.ladontype import LadonType class Calculator(object): class Table(LadonType): slno = int colTitle = str colSize = int colAlign = str @ladonize([Table],rtype=int) #notice the [], around table that means the input will be a list of Table LadonTypes. def setTables(self,tables): return len(tables)
Suds
from suds.client import Client client = Client(‘http://localhost:8888/Calculator/soap/description‘) table = client.factory.create(‘Table‘) table.slno = 1 table.colTitle = ‘col1‘ table.colSize = 10 table.colAlign = ‘L‘ table2 = client.factory.create(‘Table‘) table2.slno = 2 table2.colTitle = ‘col2‘ table2.colSize = 15 table2.colAlign = ‘L‘ tableList = [table, table2] print client.service.setTables(tableList)
标签:
原文地址:http://my.oschina.net/cppblog/blog/530442