forked from zhouhuashan/gsoap-onvif
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
417 lines (332 loc) · 19.6 KB
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
#include <iostream>
#include "stdio.h"
#include "wsdd.nsmap"
#include "plugin/wsseapi.h"
#include "plugin/wsaapi.h"
#include <openssl/rsa.h>
#include "ErrorLog.h"
#include "include/soapDeviceBindingProxy.h"
#include "include/soapMediaBindingProxy.h"
#include "include/soapPTZBindingProxy.h"
#include "include/soapPullPointSubscriptionBindingProxy.h"
#include "include/soapRemoteDiscoveryBindingProxy.h"
using namespace std;
#define DEV_PASSWORD "admin"
#define MAX_HOSTNAME_LEN 128
#define MAX_LOGMSG_LEN 256
void PrintErr(struct soap* _psoap)
{
fflush(stdout);
processEventLog(__FILE__, __LINE__, stdout, "error:%d faultstring:%s faultcode:%s faultsubcode:%s faultdetail:%s", _psoap->error,
*soap_faultstring(_psoap), *soap_faultcode(_psoap),*soap_faultsubcode(_psoap), *soap_faultdetail(_psoap));
}
int main(int argc, char* argv[])
{
bool blSupportPTZ = false;
char szHostName[MAX_HOSTNAME_LEN] = { 0 };
char sLogMsg[MAX_LOGMSG_LEN] = { 0 };
DeviceBindingProxy proxyDevice;
RemoteDiscoveryBindingProxy proxyDiscovery;
MediaBindingProxy proxyMedia;
PTZBindingProxy proxyPTZ;
PullPointSubscriptionBindingProxy proxyEvent;
if (argc > 1)
{
strcat(szHostName, "http://");
strcat(szHostName, argv[1]);
strcat(szHostName, "/onvif/device_service");
proxyDevice.soap_endpoint = szHostName;
}
else
{
processEventLog(__FILE__, __LINE__, stdout, "wrong args,usage: ./a.out 172.18.4.100 ");
return -1;
}
soap_register_plugin(proxyDevice.soap, soap_wsse);
soap_register_plugin(proxyDiscovery.soap, soap_wsse);
soap_register_plugin(proxyMedia.soap, soap_wsse);
soap_register_plugin(proxyPTZ.soap, soap_wsse);
soap_register_plugin(proxyEvent.soap, soap_wsse);
soap_register_plugin(proxyEvent.soap, soap_wsa);
struct soap *soap = soap_new();
if (SOAP_OK != soap_wsse_add_UsernameTokenDigest(proxyDevice.soap, NULL, "admin", DEV_PASSWORD))
{
return -1;
}
if (SOAP_OK != soap_wsse_add_Timestamp(proxyDevice.soap, "Time", 10))
{
return -1;
}
_tds__GetWsdlUrl *tds__GetWsdlUrl = soap_new__tds__GetWsdlUrl(soap, -1);
_tds__GetWsdlUrlResponse *tds__GetWsdlUrlResponse = soap_new__tds__GetWsdlUrlResponse(soap, -1);
if (SOAP_OK == proxyDevice.GetWsdlUrl(tds__GetWsdlUrl, tds__GetWsdlUrlResponse))
{
processEventLog(__FILE__, __LINE__, stdout, "-------------------WsdlUrl-------------------");
processEventLog(__FILE__, __LINE__, stdout, "WsdlUrl:%s ", tds__GetWsdlUrlResponse->WsdlUrl.c_str());
}
else
{
PrintErr(proxyDevice.soap);
}
soap_destroy(soap);
soap_end(soap);
if (SOAP_OK != soap_wsse_add_UsernameTokenDigest(proxyDevice.soap, NULL, "admin", DEV_PASSWORD))
{
return -1;
}
_tds__GetCapabilities *tds__GetCapabilities = soap_new__tds__GetCapabilities(soap, -1);
tds__GetCapabilities->Category.push_back(tt__CapabilityCategory__All);
_tds__GetCapabilitiesResponse *tds__GetCapabilitiesResponse = soap_new__tds__GetCapabilitiesResponse(soap, -1);
if (SOAP_OK == proxyDevice.GetCapabilities(tds__GetCapabilities, tds__GetCapabilitiesResponse))
{
if (tds__GetCapabilitiesResponse->Capabilities->Analytics != NULL)
{
processEventLog(__FILE__, __LINE__, stdout, "-------------------Analytics-------------------");
processEventLog(__FILE__, __LINE__, stdout, "XAddr:%s", tds__GetCapabilitiesResponse->Capabilities->Analytics->XAddr.c_str());
processEventLog(__FILE__, __LINE__, stdout, "RuleSupport:%s", (tds__GetCapabilitiesResponse->Capabilities->Analytics->RuleSupport) ? "Y" : "N");
processEventLog(__FILE__, __LINE__, stdout, "AnalyticsModuleSupport:%s", (tds__GetCapabilitiesResponse->Capabilities->Analytics->AnalyticsModuleSupport) ? "Y" : "N");
}
if (tds__GetCapabilitiesResponse->Capabilities->Device != NULL)
{
processEventLog(__FILE__, __LINE__, stdout, "-------------------Device-------------------");
processEventLog(__FILE__, __LINE__, stdout, "XAddr:%s", tds__GetCapabilitiesResponse->Capabilities->Device->XAddr.c_str());
processEventLog(__FILE__, __LINE__, stdout, "-------------------Network-------------------");
processEventLog(__FILE__, __LINE__, stdout, "IPFilter:%s", (tds__GetCapabilitiesResponse->Capabilities->Device->Network->IPFilter) ? "Y" : "N");
processEventLog(__FILE__, __LINE__, stdout, "ZeroConfiguration:%s", (tds__GetCapabilitiesResponse->Capabilities->Device->Network->ZeroConfiguration) ? "Y" : "N");
processEventLog(__FILE__, __LINE__, stdout, "IPVersion6:%s", (tds__GetCapabilitiesResponse->Capabilities->Device->Network->IPVersion6) ? "Y" : "N");
processEventLog(__FILE__, __LINE__, stdout, "DynDNS:%s", (tds__GetCapabilitiesResponse->Capabilities->Device->Network->DynDNS) ? "Y" : "N");
processEventLog(__FILE__, __LINE__, stdout, "-------------------System-------------------");
processEventLog(__FILE__, __LINE__, stdout, "DiscoveryResolve:%s", (tds__GetCapabilitiesResponse->Capabilities->Device->System->DiscoveryResolve) ? "Y" : "N");
processEventLog(__FILE__, __LINE__, stdout, "DiscoveryBye:%s", (tds__GetCapabilitiesResponse->Capabilities->Device->System->DiscoveryBye) ? "Y" : "N");
processEventLog(__FILE__, __LINE__, stdout, "RemoteDiscovery:%s", (tds__GetCapabilitiesResponse->Capabilities->Device->System->RemoteDiscovery) ? "Y" : "N");
int iSize = tds__GetCapabilitiesResponse->Capabilities->Device->System->SupportedVersions.size();
if (iSize > 0)
{
processEventLog(__FILE__, __LINE__, stdout, "SupportedVersions:");
for (int i = 0; i < iSize; i++)
{
processEventLog(__FILE__, __LINE__, stdout, "%d.%d ", tds__GetCapabilitiesResponse->Capabilities->Device->System->SupportedVersions[i]->Major,
tds__GetCapabilitiesResponse->Capabilities->Device->System->SupportedVersions[i]->Minor);
}
processEventLog(__FILE__, __LINE__, stdout, "");
}
processEventLog(__FILE__, __LINE__, stdout, "SystemBackup:%s", (tds__GetCapabilitiesResponse->Capabilities->Device->System->SystemBackup) ? "Y" : "N");
processEventLog(__FILE__, __LINE__, stdout, "FirmwareUpgrade:%s", (tds__GetCapabilitiesResponse->Capabilities->Device->System->FirmwareUpgrade) ? "Y" : "N");
processEventLog(__FILE__, __LINE__, stdout, "SystemLogging:%s", (tds__GetCapabilitiesResponse->Capabilities->Device->System->SystemLogging) ? "Y" : "N");
processEventLog(__FILE__, __LINE__, stdout, "-------------------IO-------------------");
processEventLog(__FILE__, __LINE__, stdout, "InputConnectors:%d", tds__GetCapabilitiesResponse->Capabilities->Device->IO->InputConnectors);
processEventLog(__FILE__, __LINE__, stdout, "RelayOutputs:%d", tds__GetCapabilitiesResponse->Capabilities->Device->IO->RelayOutputs);
processEventLog(__FILE__, __LINE__, stdout, "-------------------Security-------------------");
processEventLog(__FILE__, __LINE__, stdout, "TLS1.1:%s", (tds__GetCapabilitiesResponse->Capabilities->Device->Security->TLS1_x002e1) ? "Y" : "N");
processEventLog(__FILE__, __LINE__, stdout, "TLS1.2:%s", (tds__GetCapabilitiesResponse->Capabilities->Device->Security->TLS1_x002e2) ? "Y" : "N");
processEventLog(__FILE__, __LINE__, stdout, "OnboardKeyGeneration:%s", (tds__GetCapabilitiesResponse->Capabilities->Device->Security->OnboardKeyGeneration) ? "Y" : "N");
processEventLog(__FILE__, __LINE__, stdout, "AccessPolicyConfig:%s", (tds__GetCapabilitiesResponse->Capabilities->Device->Security->AccessPolicyConfig) ? "Y" : "N");
processEventLog(__FILE__, __LINE__, stdout, "X.509Token:%s", (tds__GetCapabilitiesResponse->Capabilities->Device->Security->X_x002e509Token) ? "Y" : "N");
processEventLog(__FILE__, __LINE__, stdout, "SAMLToken:%s", (tds__GetCapabilitiesResponse->Capabilities->Device->Security->SAMLToken) ? "Y" : "N");
processEventLog(__FILE__, __LINE__, stdout, "KerberosToken:%s", (tds__GetCapabilitiesResponse->Capabilities->Device->Security->KerberosToken) ? "Y" : "N");
processEventLog(__FILE__, __LINE__, stdout, "RELToken:%s", (tds__GetCapabilitiesResponse->Capabilities->Device->Security->RELToken) ? "Y" : "N");
}
if (tds__GetCapabilitiesResponse->Capabilities->Events != NULL)
{
processEventLog(__FILE__, __LINE__, stdout, "-------------------Events-------------------");
processEventLog(__FILE__, __LINE__, stdout, "XAddr:%s", tds__GetCapabilitiesResponse->Capabilities->Events->XAddr.c_str());
processEventLog(__FILE__, __LINE__, stdout, "WSSubscriptionPolicySupport:%s", (tds__GetCapabilitiesResponse->Capabilities->Events->WSSubscriptionPolicySupport) ? "Y" : "N");
processEventLog(__FILE__, __LINE__, stdout, "WSPullPointSupport:%s", (tds__GetCapabilitiesResponse->Capabilities->Events->WSPullPointSupport) ? "Y" : "N");
processEventLog(__FILE__, __LINE__, stdout, "WSPausableSubscriptionManagerInterfaceSupport:%s",
(tds__GetCapabilitiesResponse->Capabilities->Events->WSPausableSubscriptionManagerInterfaceSupport) ? "Y" : "N");
proxyEvent.soap_endpoint = tds__GetCapabilitiesResponse->Capabilities->Events->XAddr.c_str();
}
if (tds__GetCapabilitiesResponse->Capabilities->Imaging != NULL)
{
processEventLog(__FILE__, __LINE__, stdout, "-------------------Imaging-------------------");
processEventLog(__FILE__, __LINE__, stdout, "XAddr:%s", tds__GetCapabilitiesResponse->Capabilities->Imaging->XAddr.c_str());
}
if (tds__GetCapabilitiesResponse->Capabilities->Media != NULL)
{
processEventLog(__FILE__, __LINE__, stdout, "-------------------Media-------------------");
processEventLog(__FILE__, __LINE__, stdout, "XAddr:%s", tds__GetCapabilitiesResponse->Capabilities->Media->XAddr.c_str());
processEventLog(__FILE__, __LINE__, stdout, "-------------------streaming-------------------");
processEventLog(__FILE__, __LINE__, stdout, "RTPMulticast:%s", (tds__GetCapabilitiesResponse->Capabilities->Media->StreamingCapabilities->RTPMulticast) ? "Y" : "N");
processEventLog(__FILE__, __LINE__, stdout, "RTP_TCP:%s", (tds__GetCapabilitiesResponse->Capabilities->Media->StreamingCapabilities->RTP_USCORETCP) ? "Y" : "N");
processEventLog(__FILE__, __LINE__, stdout, "RTP_RTSP_TCP:%s", (tds__GetCapabilitiesResponse->Capabilities->Media->StreamingCapabilities->RTP_USCORERTSP_USCORETCP) ? "Y" : "N");
proxyMedia.soap_endpoint = tds__GetCapabilitiesResponse->Capabilities->Media->XAddr.c_str();
}
if (tds__GetCapabilitiesResponse->Capabilities->PTZ != NULL)
{
processEventLog(__FILE__, __LINE__, stdout, "-------------------PTZ-------------------");
processEventLog(__FILE__, __LINE__, stdout, "XAddr:%s", tds__GetCapabilitiesResponse->Capabilities->PTZ->XAddr.c_str());
proxyPTZ.soap_endpoint = tds__GetCapabilitiesResponse->Capabilities->PTZ->XAddr.c_str();
blSupportPTZ = true;
}
}
else
{
PrintErr(proxyDevice.soap);
}
soap_destroy(soap);
soap_end(soap);
_tds__GetDeviceInformation *tds__GetDeviceInformation = soap_new__tds__GetDeviceInformation(soap, -1);
_tds__GetDeviceInformationResponse *tds__GetDeviceInformationResponse = soap_new__tds__GetDeviceInformationResponse(soap, -1);
if (SOAP_OK == proxyDevice.GetDeviceInformation(tds__GetDeviceInformation, tds__GetDeviceInformationResponse))
{
processEventLog(__FILE__, __LINE__, stdout, "-------------------DeviceInformation-------------------");
processEventLog(__FILE__, __LINE__, stdout, "Manufacturer:%sModel:%s\r\nFirmwareVersion:%s\r\nSerialNumber:%s\r\nHardwareId:%s", tds__GetDeviceInformationResponse->Manufacturer.c_str(),
tds__GetDeviceInformationResponse->Model.c_str(), tds__GetDeviceInformationResponse->FirmwareVersion.c_str(),
tds__GetDeviceInformationResponse->SerialNumber.c_str(), tds__GetDeviceInformationResponse->HardwareId.c_str());
}
else
{
PrintErr(proxyDevice.soap);
}
soap_destroy(soap);
soap_end(soap);
if (SOAP_OK != soap_wsse_add_UsernameTokenDigest(proxyDevice.soap, NULL, "admin", DEV_PASSWORD))
{
return -1;
}
_tds__GetNetworkInterfaces *tds__GetNetworkInterfaces = soap_new__tds__GetNetworkInterfaces(soap, -1);
_tds__GetNetworkInterfacesResponse *tds__GetNetworkInterfacesResponse = soap_new__tds__GetNetworkInterfacesResponse(soap, -1);
if (SOAP_OK == proxyDevice.GetNetworkInterfaces(tds__GetNetworkInterfaces, tds__GetNetworkInterfacesResponse))
{
processEventLog(__FILE__, __LINE__, stdout, "-------------------NetworkInterfaces-------------------");
processEventLog(__FILE__, __LINE__, stdout, "%s", tds__GetNetworkInterfacesResponse->NetworkInterfaces[0]->token.c_str());
processEventLog(__FILE__, __LINE__, stdout, "%s", tds__GetNetworkInterfacesResponse->NetworkInterfaces[0]->Info->HwAddress.c_str());
}
else
{
PrintErr(proxyDevice.soap);
}
soap_destroy(soap);
soap_end(soap);
if (SOAP_OK != soap_wsse_add_UsernameTokenDigest(proxyMedia.soap, NULL, "admin", DEV_PASSWORD))
{
return -1;
}
if (SOAP_OK != soap_wsse_add_Timestamp(proxyMedia.soap, "Time", 10))
{
return -1;
}
_trt__GetProfiles *trt__GetProfiles = soap_new__trt__GetProfiles(soap, -1);
_trt__GetProfilesResponse *trt__GetProfilesResponse = soap_new__trt__GetProfilesResponse(soap, -1);
if (SOAP_OK == proxyMedia.GetProfiles(trt__GetProfiles, trt__GetProfilesResponse))
{
_trt__GetStreamUri *trt__GetStreamUri = soap_new__trt__GetStreamUri(soap, -1);
trt__GetStreamUri->StreamSetup = soap_new_tt__StreamSetup(soap, -1);
trt__GetStreamUri->StreamSetup->Stream = tt__StreamType__RTP_Unicast;
trt__GetStreamUri->StreamSetup->Transport = soap_new_tt__Transport(soap, -1);
trt__GetStreamUri->StreamSetup->Transport->Protocol = tt__TransportProtocol__RTSP;
_trt__GetStreamUriResponse *trt__GetStreamUriResponse = soap_new__trt__GetStreamUriResponse(soap, -1);
processEventLog(__FILE__, __LINE__, stdout, "-------------------MediaProfiles-------------------");
for (int i = 0; i < trt__GetProfilesResponse->Profiles.size(); i++)
{
processEventLog(__FILE__, __LINE__, stdout, "profile%d:%s Token:%s\r", i, trt__GetProfilesResponse->Profiles[i]->Name.c_str(), trt__GetProfilesResponse->Profiles[i]->token.c_str());
trt__GetStreamUri->ProfileToken = trt__GetProfilesResponse->Profiles[i]->token;
if (SOAP_OK != soap_wsse_add_UsernameTokenDigest(proxyMedia.soap, NULL, "admin", DEV_PASSWORD))
{
return -1;
}
if (SOAP_OK == proxyMedia.GetStreamUri(trt__GetStreamUri, trt__GetStreamUriResponse))
{
processEventLog(__FILE__, __LINE__, stdout, "RTSP URI:%s", trt__GetStreamUriResponse->MediaUri->Uri.c_str());
}
else
{
PrintErr(proxyMedia.soap);
}
}
}
else
{
PrintErr(proxyMedia.soap);
}
soap_destroy(soap);
soap_end(soap);
if (SOAP_OK != soap_wsse_add_UsernameTokenDigest(proxyMedia.soap, NULL, "admin", DEV_PASSWORD))
{
return -1;
}
_trt__GetVideoEncoderConfigurations *trt__GetVideoEncoderConfigurations = soap_new__trt__GetVideoEncoderConfigurations(soap, -1);
_trt__GetVideoEncoderConfigurationsResponse *trt__GetVideoEncoderConfigurationsResponse = soap_new__trt__GetVideoEncoderConfigurationsResponse(soap, -1);
if (SOAP_OK == proxyMedia.GetVideoEncoderConfigurations(trt__GetVideoEncoderConfigurations, trt__GetVideoEncoderConfigurationsResponse))
{
processEventLog(__FILE__, __LINE__, stdout, "-------------------VideoEncoderConfigurations-------------------");
for (int i = 0; i < trt__GetVideoEncoderConfigurationsResponse->Configurations.size(); i++)
{
_trt__GetVideoEncoderConfiguration *trt__GetVideoEncoderConfiguration = soap_new__trt__GetVideoEncoderConfiguration(soap, -1);
_trt__GetVideoEncoderConfigurationResponse *trt__GetVideoEncoderConfigurationResponse = soap_new__trt__GetVideoEncoderConfigurationResponse(soap, -1);
trt__GetVideoEncoderConfiguration->ConfigurationToken = trt__GetVideoEncoderConfigurationsResponse->Configurations[i]->token;
if (SOAP_OK == proxyMedia.GetVideoEncoderConfiguration(trt__GetVideoEncoderConfiguration, trt__GetVideoEncoderConfigurationResponse))
{
}
else
{
PrintErr(proxyMedia.soap);
}
processEventLog(__FILE__, __LINE__, stdout, "Encoding:%s",
(trt__GetVideoEncoderConfigurationsResponse->Configurations[i]->Encoding == tt__VideoEncoding__JPEG) ? "tt__VideoEncoding__JPEG" :
(trt__GetVideoEncoderConfigurationsResponse->Configurations[i]->Encoding == tt__VideoEncoding__MPEG4) ? "tt__VideoEncoding__MPEG4" :
(trt__GetVideoEncoderConfigurationsResponse->Configurations[i]->Encoding == tt__VideoEncoding__H264) ? "tt__VideoEncoding__H264" : "Error VideoEncoding");
processEventLog(__FILE__, __LINE__, stdout, "name:%s UseCount:%d token:%s\r\n", trt__GetVideoEncoderConfigurationsResponse->Configurations[i]->Name.c_str(),
trt__GetVideoEncoderConfigurationsResponse->Configurations[i]->UseCount, trt__GetVideoEncoderConfigurationsResponse->Configurations[i]->token.c_str());
processEventLog(__FILE__, __LINE__, stdout, "Width:%d Height:%d\r\n", trt__GetVideoEncoderConfigurationsResponse->Configurations[i]->Resolution->Width,
trt__GetVideoEncoderConfigurationsResponse->Configurations[i]->Resolution->Height);
if (SOAP_OK != soap_wsse_add_UsernameTokenDigest(proxyMedia.soap, NULL, "admin", DEV_PASSWORD))
{
return -1;
}
_trt__GetVideoEncoderConfigurationOptions *trt__GetVideoEncoderConfigurationOptions = soap_new__trt__GetVideoEncoderConfigurationOptions(soap, -1);
_trt__GetVideoEncoderConfigurationOptionsResponse *trt__GetVideoEncoderConfigurationOptionsResponse = soap_new__trt__GetVideoEncoderConfigurationOptionsResponse(soap, -1);
trt__GetVideoEncoderConfigurationOptions->ConfigurationToken = &trt__GetVideoEncoderConfigurationsResponse->Configurations[i]->token;
if (SOAP_OK == proxyMedia.GetVideoEncoderConfigurationOptions(trt__GetVideoEncoderConfigurationOptions, trt__GetVideoEncoderConfigurationOptionsResponse))
{
}
else
{
PrintErr(proxyMedia.soap);
}
}
}
else
{
PrintErr(proxyMedia.soap);
}
soap_destroy(soap);
soap_end(soap);
if (SOAP_OK != soap_wsse_add_UsernameTokenDigest(proxyEvent.soap, NULL, "admin", DEV_PASSWORD))
{
return -1;
}
if (SOAP_OK != soap_wsse_add_Timestamp(proxyEvent.soap, "Time", 10))
{
return -1;
}
_tev__GetEventProperties *tev__GetEventProperties = soap_new__tev__GetEventProperties(soap, -1);
_tev__GetEventPropertiesResponse *tev__GetEventPropertiesResponse = soap_new__tev__GetEventPropertiesResponse(soap, -1);
if (SOAP_OK != soap_wsa_request(proxyEvent.soap, NULL, NULL, "http://www.onvif.org/ver10/events/wsdl/EventPortType/GetEventPropertiesRequest"))
{
return -1;
}
if (proxyEvent.GetEventProperties(tev__GetEventProperties, tev__GetEventPropertiesResponse) == SOAP_OK)
{
processEventLog(__FILE__, __LINE__, stdout, "-------------------EventProperties-------------------");
for (int i = 0; i < tev__GetEventPropertiesResponse->TopicNamespaceLocation.size(); i++)
{
processEventLog(__FILE__, __LINE__, stdout, "TopicNamespaceLocation[%d]:%s", i, tev__GetEventPropertiesResponse->TopicNamespaceLocation[i].c_str());
}
for (int i = 0; i < tev__GetEventPropertiesResponse->MessageContentFilterDialect.size(); i++)
{
processEventLog(__FILE__, __LINE__, stdout, "MessageContentFilterDialect[%d]:%s", i, tev__GetEventPropertiesResponse->MessageContentFilterDialect[i].c_str());
}
for (int i = 0; i < tev__GetEventPropertiesResponse->MessageContentSchemaLocation.size(); i++)
{
processEventLog(__FILE__, __LINE__, stdout, "MessageContentSchemaLocation[%d]:%s", i, tev__GetEventPropertiesResponse->MessageContentSchemaLocation[i].c_str());
}
}
else
{
PrintErr(proxyEvent.soap);
}
soap_destroy(soap);
soap_end(soap);
return 0;
}