You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My code is as follows: e = Client('wsdl/events.wsdl', wsse=UsernameToken('admin', 'admin123', use_digest=False)) service3 = e.create_service('{http://www.onvif.org/ver10/events/wsdl}PullPointSubscriptionBinding', 'http://192.168.2.161:8000/onvif/PullSubManager?Idx=00_0') req = service3.PullMessages(Timeout='PT10S', MessageLimit=30)
This generates almost a correct soap/xml request, except the Timeout='PT10S' (or any value) changes to "P%P", which the camera of course does not like.
I tried it a few times with different Python3 versions and also the official ONVF event.wsdl, and the Timeout is always corrupted in the output SOAP ... I guess this needs to be a bug in Zeep?
I am testing with Zeep and an ONVIF camera, but I am unable to get the "xsd:duration" field to properly work.
I use the following WSDL:
https://github.com/FalkTannhaeuser/python-onvif-zeep/blob/zeep/wsdl/events.wsdl
My code is as follows:
e = Client('wsdl/events.wsdl', wsse=UsernameToken('admin', 'admin123', use_digest=False))
service3 = e.create_service('{http://www.onvif.org/ver10/events/wsdl}PullPointSubscriptionBinding', 'http://192.168.2.161:8000/onvif/PullSubManager?Idx=00_0')
req = service3.PullMessages(Timeout='PT10S', MessageLimit=30)
This generates almost a correct soap/xml request, except the Timeout='PT10S' (or any value) changes to "P%P", which the camera of course does not like.
The output SOAP looks like:
<?xml version='1.0' encoding='utf-8'?> <soap-env:Envelope xmlns:soap-env="http://www.w3.org/2003/05/soap-envelope"><soap-env:Header xmlns:wsa="http://www.w3.org/2005/08/addressing"><wsa:Action>http://www.onvif.org/ver10/events/wsdl/PullPointSubscription/PullMessagesRequest</wsa:Action><wsa:MessageID>urn:uuid:2889fc4a-2dae-4980-a335-60ea540e6c3a</wsa:MessageID><wsa:To>http://192.168.2.161:8000/onvif/PullSubManager?Idx=00_2</wsa:To><wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><wsse:UsernameToken><wsse:Username>admin</wsse:Username><wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">admin123</wsse:Password></wsse:UsernameToken></wsse:Security></soap-env:Header><soap-env:Body><ns0:PullMessages xmlns:ns0="http://www.onvif.org/ver10/events/wsdl"><ns0:Timeout>P%P</ns0:Timeout><ns0:MessageLimit>30</ns0:MessageLimit></ns0:PullMessages></soap-env:Body></soap-env:Envelope>
The text was updated successfully, but these errors were encountered: