Open Vorobeyko opened 7 years ago
I found is a great solution:
topic_expression_type = zeep_client.get_type('TopicExpressionType')
from zeep import xsd
topic_exp = xsd.Element('{http://docs.oasis-open.org/wsn/b-2}TopicExpression',xsd.ComplexType(topic_expression_type))
subscribe = notification.create_type('Subscribe')
any = xsd.AnyObject(topic_exp,topic_expression_type(_value_1=xsd.AnyObject(xsd.String(), 'o2kvmd:Telemetry//.'),Dialect='http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet'))
obj = subscribe(ConsumerReference='http://10.1.50.11:8000', InitialTerminationTime='PT60S', Filter={'_value_1': any})
notification.Subscribe(obj)
What method did you use to create notification object or subscribe in your first post?
I send request Subscribe, like this:
But i got error:
BUT, when i delete 'Filter': 'o2kvmd:Telemetry//.' this request work good. Question, how i can set Filter - TopicExression?