I'm trying to implement a camera device server with onvif profile s standards using gsoap. on ws dynamic discovery, when I tried to run code in https://github.com/mpromonet/ws-discovery/blob/master/gsoap/server.cpp, Onvif device manager does not give any answer to my probematches message. I can see that I'm getting probe message, sending probematches messages but Onvif device manager simply neglects them. I'm made these parameter changes for my device:
const int _metadataVersion = 1;
static const char* _xaddr= "http://10.0.0.50:1881";
const char* _type="tdn:NetworkVideoTransmitter " "tds:Device " ;
const char* _scope=
"onvif://www.onvif.org/name/ru "
"onvif://www.onvif.org/hardware/hw "
"onvif://www.onvif.org/Profile/Streaming "
"onvif://www.onvif.org/location/ANY "
"onvif://www.onvif.org/type/video_encoder onvif://www.onvif.org/type/audio_encoder onvif://www.onvif.org/type/ptz ";
const char* _endpoint="urn";
I tried many parameters but I could not find the solution. What kind of changes do i need to make, in order to be discoverable by Onvif device manager?
As you can see, the namespace you used (tdn & tds) are not declared in the generated namespaces (in gen/wsdd.nsmap) :
#include "soapH.h"
SOAP_NMAC struct Namespace namespaces[] =
{
{"SOAP-ENV", "http://schemas.xmlsoap.org/soap/envelope/", "http://www.w3.org/*/soap-envelope", NULL},
{"SOAP-ENC", "http://schemas.xmlsoap.org/soap/encoding/", "http://www.w3.org/*/soap-encoding", NULL},
{"xsi", "http://www.w3.org/2001/XMLSchema-instance", "http://www.w3.org/*/XMLSchema-instance", NULL},
{"xsd", "http://www.w3.org/2001/XMLSchema", "http://www.w3.org/*/XMLSchema", NULL},
{"wsa", "http://schemas.xmlsoap.org/ws/2004/08/addressing", NULL, NULL},
{"wsdd", "http://schemas.xmlsoap.org/ws/2005/04/discovery", NULL, NULL},
{NULL, NULL, NULL, NULL}
};
In order to specify a wsdd:ProbeType
with a qualified name you should use:
"http://www.onvif.org/ver10/network/wsdl":NetworkVideoTransmitter
This can be achieved specifying the -t
argument :
ws-discovery.exe -t \"http://www.onvif.org/ver10/network/wsdl\":NetworkVideoTransmitter \
-x http://10.0.0.50:1881
or modifying the code:
const char* _type="\"http://www.onvif.org/ver10/network/wsdl\":NetworkVideoTransmitter" ;