When I converted the Onvif source xml files, I created one big project.
Up till now, I've only used the "DeviceBindingService" soap object, and have
had good results. As you can see from the code snippit for main(), I'm using
the serve() method & running as a CGI application - and all is well.
Now, I'm moving along with the Onvif testing and I now need to code
responses for the "MediaBindingService" soap object. I can create a new object
& I can call the serve() method "MediaDevice.serve()", and while it compiles
fine, both of the soap objects respond! Using Wireshark, I can see the response
has both - a pass from the service that it's intended for, and a fail from the
other service.
I know that I can have multiple soap objects, do you have any
suggestions on how to get mulitple soap objects working at same time? Do I need
to setup threads? How can I prevent one from responding as a error to the other?
Thanks in advance for your help & ideas.
-JF
Joseph Fitzgerald
Vicon Industries
code -
file onvif_namespace.cpp -
#include "soapDeviceBindingService.h"
#include "DeviceBinding.nsmap" //gobal namespaces
#include "soapMediaBindingService.h"
//#include "MediaBinding.nsmap"
int main(int argc, char **argv)
{
DeviceBindingService OnvifDevice ;
MediaBindingService MediaDevice;
if (argc < 2)
{
OnvifDevice.serve(); /* serve as CGI application */
//MediaDevice.serve(); /* when added - causes the errors for device messages
*/
}
...