-
-
Notifications
You must be signed in to change notification settings - Fork 610
Open
Description
Version: zeep 4.0.0
WSDL: 'http://www.dataaccess.com/webservicesserver/numberconversion.wso?WSDL'
Hi guys,
i am starting developing a soap interface based on zeep. Our application works mostly async, so I try to use the AsyncClient. Additional I test the interface against a mock, placed in soap_ui. For using the mock, it is necessary to define the endpoint to the mock, so I used the create_service method.
client = AsyncClient(wsdl='http://www.dataaccess.com/webservicesserver/numberconversion.wso?WSDL')
service = client.create_service('{http://www.dataaccess.com/webservicesserver/}NumberConversionSoapBinding',
'http://[replaced]:8088/mockNumberConversionSoapBinding')
loop = asyncio.new_event_loop()
print(loop.run_until_complete(service.NumberToDollars(2)))
The expception log:
Traceback (most recent call last):
File ".\tests\minimal_examples\soap.py", line 46, in <module>
print(loop.run_until_complete(service.NumberToDollars(2)))
File "[replaced]\.tox\dev\lib\site-packages\zeep\proxy.py", line 46, in __call__
return self._proxy._binding.send(
File "[replaced]\.tox\dev\lib\site-packages\zeep\wsdl\bindings\soap.py", line 135, in send
return self.process_reply(client, operation_obj, response)
File "[replaced]\.tox\dev\lib\site-packages\zeep\wsdl\bindings\soap.py", line 177, in process_reply
if response.status_code in (201, 202) and not response.content:
AttributeError: 'coroutine' object has no attribute 'status_code'
sys:1: RuntimeWarning: coroutine 'AsyncTransport.post_xml' was never awaited
After some research, the reason is the create_service method, defined in the sync client, which returns a sync ServiceProxy object, but exected will be a AsyncServiceProxy object.
Is my assumption right?
BR Jens
Metadata
Metadata
Assignees
Labels
No labels