Open andreabisello opened 5 years ago
calling the soap services InsertDraftElectronicInvoice
using a dict,
answer = client.service.InsertDraftElectronicInvoice( paramAuth={"CustomerCode": CODICE_CLIENTE, "Password": BYTES_PASSWORD_CLIENTE_CIFRATA}, uploadRequest={ "UploadingFiles": [{ "UploadElectronicInvoiceFileRequest": { "TransactionId": "", "FileName": filename, "Content": content, "StateInvoice": "ToSend", "ProformaInvoice": True, "PathFileInvoice": "" }, "UploadElectronicInvoiceFileRequest": { "TransactionId": "", "FileName": filename, "Content": content, "StateInvoice": "ToSend", "ProformaInvoice": True, "PathFileInvoice": "" } }] } )
the library will send only the first element of the array
but if i use the get_type
answer = client.service.InsertDraftElectronicInvoice( paramAuth={"CustomerCode": CODICE_CLIENTE, "Password": BYTES_PASSWORD_CLIENTE_CIFRATA}, uploadRequest=client.get_type('ns0:UploadElectronicInvoiceRequest')( client.get_type('ns0:ArrayOfUploadElectronicInvoiceFileRequest')( [client.get_type('ns0:UploadElectronicInvoiceFileRequest')( FileName="uno.xml", Content=content, StateInvoice="ToSend", ProformaInvoice=True ), client.get_type('ns0:UploadElectronicInvoiceFileRequest')( FileName="due.xml", Content=content, StateInvoice="ToSend", ProformaInvoice=True ) ] ) ) )
it works, sending array with two elements.
I too am experiencing this bug.
+1
calling the soap services InsertDraftElectronicInvoice
using a dict,
the library will send only the first element of the array
but if i use the get_type
it works, sending array with two elements.