0

I'm trying to implement ONVIF WS-BaseNotification mechanism using python and requirement is like this.

  • Subscribe for events from an ONVIF compliant camera
  • Upon receiving notifications, from camera parse the notification message and extract motion event from there.

Here is what my plan:

  • Download the wsdl from here
  • Convert the wsdl to python file using wsdl2py
  • Use the NotificationConsumer server and client classes to send/receive soap messages.

Currently I'm stuck at #2, where I'm not able to convert the wsdl file properly. When I try to generate the python classes, what I get is 2 classes: 1 is WS_BaseNotification_services.py and other one is WS_BaseNotification_services_types.py.

In WS_BaseNotification_services.py, I can see nothing but the header part like this:

############################################

# WS_BaseNotification_services.py #generated by ZSI.generate.wsdl2python

#

and In WS_BaseNotification_services_types.py, all the types are coming up.

I think there is some issue with wsdl file as I've even tried loading this wsdl in SOAP-UI, but got error like this:

Error message from SOAP UI

Any idea on what went wrong.

HRM
  • 2,097
  • 6
  • 23
  • 37

1 Answers1

0

This issue is now solved. We need to edit the wsdl file to include Bindings also.

HRM
  • 2,097
  • 6
  • 23
  • 37
  • Hello, though this is old, can you please tell what changes you did? if you can recollect. or share what you have done. We are also trying to do the same thing. – JOA80 Sep 22 '20 at 06:17
  • @JOA80, I don't remember exactly what I did and I don't have any contents to refer also. On reading the answer, I believe that its fixed by editing the wsdl file by adding the `Bindings` property. One thing I remember is that it should be able to import from SoapUI which was also not working initially; but after editing I can import from there also. Hope this link give you some insight - https://www.soapui.org/docs/soap-and-wsdl/working-with-wsdls/ – HRM Sep 23 '20 at 07:32