There is a parsing issue if an operation output/input does not have direct children soap:body or soap:header elements. Here is a sample zipped WSDL file attached where a getWsdl-operation have a direct child mime:multipartRelated in a wsdl:output element.
The issue is that those soap:body and soap:header elements in wsdl:output are not found and therefore not parsed. When request is done then response processing fails and raises AttributeError.
Traceback (most recent call last):
File "/home/user/git/xroad/client.py", line 132, in <module>
res = client.service.getWsdl(
File "/home/user/.virtualenvs/zeep/lib64/python3.10/site-packages/zeep/proxy.py", line 46, in __call__
return self._proxy._binding.send(
File "/home/user/.virtualenvs/zeep/lib64/python3.10/site-packages/zeep/wsdl/bindings/soap.py", line 135, in send
return self.process_reply(client, operation_obj, response)
File "/home/user/.virtualenvs/zeep/lib64/python3.10/site-packages/zeep/wsdl/bindings/soap.py", line 231, in process_reply
result = operation.process_reply(doc)
File "/home/user/.virtualenvs/zeep/lib64/python3.10/site-packages/zeep/wsdl/bindings/soap.py", line 430, in process_reply
return self.output.deserialize(envelope)
File "/home/user/.virtualenvs/zeep/lib64/python3.10/site-packages/zeep/wsdl/messages/soap.py", line 101, in deserialize
body_result = self._deserialize_body(body)
File "/home/user/.virtualenvs/zeep/lib64/python3.10/site-packages/zeep/wsdl/messages/soap.py", line 442, in _deserialize_body
result = self.body.parse(xmlelement, self.wsdl.types, context=context)
AttributeError: 'NoneType' object has no attribute 'parse'
I changed find and findall to look elements anywhere from given tree.
There is a parsing issue if an operation output/input does not have direct children soap:body or soap:header elements. Here is a sample zipped WSDL file attached where a getWsdl-operation have a direct child mime:multipartRelated in a wsdl:output element.
xroad_meta_service.zip
The issue is that those soap:body and soap:header elements in wsdl:output are not found and therefore not parsed. When request is done then response processing fails and raises AttributeError.
I changed find and findall to look elements anywhere from given tree.