2

My company is trying to figure out how to turn our current camera line into ONVIF compliant cameras.

What I've found is the specification documents and a bunch of WSDL files. But everything I've seen so far appears to set up "the client side" of things.

I'm trying to create a middleware service so that our existing cameras can become ONVIF supported.

Are the WSDL files used for both a client and a device?

How do companies program ONVIF compliant cameras? Our's are PTZs, would the PTZ WSDL be what I'm looking for?

How does one start the service device side. Although the specification covers everything it isn't written well for new developers of the standard.

Please help me figure out how I would turn my embedded linux camera in c++ into an ONVIF compliant camera. Do developers use the WSDLs to achieve this?

Thank you!

  • _"Are the WSDL files used for both a client and a device?"_ Yes they are the _contract_ of the service. You may have a look after gSoap within this context. It's widely used to create c++ based web-services. Besides this, your question is too broad here. – πάντα ῥεῖ Apr 24 '15 at 14:55
  • Were you able to find anything that helped you create an onvif camera? – thunderbird May 13 '17 at 15:40

1 Answers1

5

well one of the most common ways to implement ONVIF is via the gSoap library, it has a very vast guide regarding both client and server use cases. You should go through the server side documentation to get a glimpse of how it works. From a very generalized point of view - it has a wsdl2h tool that takes a set of WSDL files and generates stub code (mostly parsing and I/O code that takes care of creating structure representations of the request data) for you, then using another gSoap tool called soapcpp2 you can generate C/C++ client/server objects (I've worked only with client side, so I guess the guide mentioned above is the best way to understand how to build a server using the generated objects). Then you can host a service and interact with the requests from the camera through this C/C++ object abstraction, which should be quite easy. All the request xmls are deserialized to object instances, and you can just look at the needed fields, create an instance of the needed response object and send it back. At least I've been using gSoap so far for client requests to ONVIF cameras and I'm quite satisfied. Here is a small tutorial from the maintainers of gSoap on how to deploy a simple service.

That being said, I've seen cameras that don't use gSoap or any other high level framework and just parse the request content with any common xml parser and have response string templates that are formatted with the needed values and sent back - if your camera is not very complex this might work, but it depends on your needs. Feel free to ask any follow up questions, at least for me ONVIF was quite a spiders web when I started.

Rudolfs Bundulis
  • 11,636
  • 6
  • 33
  • 71
  • 1
    It's worth a mention that the guides aren't really up-to-date. I think the latest one is this one - http://www.genivia.com/dev.html (Notice it has some compilation errors in its examples) – Nitay Oct 29 '15 at 09:46