Hello,
I havent exactly bug, rather cant set dictinoary for specific instance. I try to search in your documentation or in the internet articles or discussion, but no success. Maybe, its a trifle and I'm a fool.
I would like to prepare the right dictionary in zepp, which describe element "SENDER". This element have a value and also the attribute, like this:
I found some examples, where are elements with attribute, but without value, like this:
My script can assing the attribute to to element, but cant assing the value to the same element. Please, could you help me?
The request, which is sent:
And I need:
Thank you for any help or information about this. I'm sorry if the issue is stupid, and wasting your time.
Martin
client = Client('http://provoz.szdc.cz/kadrws/taftsi2_1.asmx?WSDL')
node = client.create_message(client.service, 'CZRequestOnAvailableIDMessage',
message =
{
'MessageHeader': {
'MessageReference': {
'MessageType': '1000',
'MessageTypeVersion': '2.1',
'MessageIdentifier' : 'kzc',
'MessageDateTime' : datetime.datetime.utcnow(),
},
'Sender': {
'CI_InstanceNumber': '01'},
},
'AllPathsOfTheCompany': "false",
'PathModificationDate': datetime.datetime.utcnow(),
})
return (etree.tostring(node, pretty_print=True))
The solution is simple as ussualy:)
'Sender': {
'CI_InstanceNumber': 'attribute_value',
'_value_1': 'element_value'},
Martin
Yeah the whole _value_x thing is still mwehhhhh :-)
Most helpful comment
The solution is simple as ussualy:)
Martin