Closed xzrokeman closed 1 year ago
Well,I find that https://github.com/mvantellingen/python-zeep/issues/558 has answered my question.
first I need to check the namespaces:
client1.namespaces
#----------------------------
{'xsd': 'http://www.w3.org/2001/XMLSchema',
'ns0': 'urn:client.wsvoucher',
'ns1': 'http://192.168.130.6:6890/ormrpc/services/WSWSVoucher',
'ns2': 'http://schemas.xmlsoap.org/soap/encoding/',
'ns3': 'http://app.gl.fi.eas.kingdee.com'}
then I can get the right type using client.get_type method and add lines as array elements:
emptyplaceholder = client1.get_type('ns1:ArrayOf_tns1_WSWSVoucher')
voucher = emptyplaceholder([])# instantiate using an empty list
voucher.append(params_1)
voucher.append(params_2)
with client1.settings(raw_response=True)
response = client1.service.importVoucher(voucher, 1, 0, 0)
assert response.status_code == 200
assert response.content
Thanks for making this amazing tool~And this issue could be closed~
here's the wsdl:
What I am trying to do is call the importVoucher function. For each voucher we have at least 2 voucherCols, each voucherCols have the params describe in WSWSVoucher. I've successfully import 1 line voucher but I'm confused on how to import two lines as a whole.
The above code worked but I've no idea how to import 2 or more lines as a whole. I tryed:
and got an error:
Any help? @mvantellingen