真实的国产乱ⅩXXX66竹夫人,五月香六月婷婷激情综合,亚洲日本VA一区二区三区,亚洲精品一区二区三区麻豆

成都創(chuàng)新互聯(lián)網(wǎng)站制作重慶分公司

onvifclientDiscovery實現(xiàn)

省略:onvif client soapRemoteDiscoveryBindingProxy 由 gsoap C++ 方式生成

十余年的白河網(wǎng)站建設(shè)經(jīng)驗,針對設(shè)計、前端、開發(fā)、售后、文案、推廣等六對一服務(wù),響應(yīng)快,48小時及時工作處理。網(wǎng)絡(luò)營銷推廣的優(yōu)勢是能夠根據(jù)用戶設(shè)備顯示端的尺寸不同,自動調(diào)整白河建站的顯示方式,使網(wǎng)站能夠適用不同顯示終端,在瀏覽器中調(diào)整網(wǎng)站的寬度,無論在任何一種瀏覽器上瀏覽網(wǎng)站,都能展現(xiàn)優(yōu)雅布局與設(shè)計,從而大程度地提升瀏覽體驗。成都創(chuàng)新互聯(lián)公司從事“白河網(wǎng)站設(shè)計”,“白河網(wǎng)站推廣”以來,每個客戶項目都認(rèn)真落實執(zhí)行。

#include "soapRemoteDiscoveryBindingProxy.h"

#include "RemoteDiscoveryBinding.nsmap"

#include

using namespace  std;

SOAP_FMAC5 int SOAP_FMAC6 soap_send___wsdd__Probe(struct soap *soap, const char *soap_endpoint, const char *soap_action, struct wsdd__ProbeType *wsdd__Probe)

{struct __wsdd__Probe soap_tmp___wsdd__Probe;

if (soap_action == NULL)

soap_action = "http://docs.oasis-open.org/ws-dd/ns/discovery/2009/01/Probe";

soap_tmp___wsdd__Probe.wsdd__Probe = wsdd__Probe;

soap_begin(soap);

soap_set_version(soap, 2); /* SOAP1.2 */

soap->encodingStyle = NULL;

soap_serializeheader(soap);

soap_serialize___wsdd__Probe(soap, &soap_tmp___wsdd__Probe);

if (soap_begin_count(soap))

return soap->error;

if (soap->mode & SOAP_IO_LENGTH)

{if (soap_envelope_begin_out(soap)

|| soap_putheader(soap)

|| soap_body_begin_out(soap)

|| soap_put___wsdd__Probe(soap, &soap_tmp___wsdd__Probe, "-wsdd:Probe", "")

|| soap_body_end_out(soap)

|| soap_envelope_end_out(soap))

return soap->error;

}

if (soap_end_count(soap))

return soap->error;

if (soap_connect(soap, soap_endpoint, soap_action)

|| soap_envelope_begin_out(soap)

|| soap_putheader(soap)

|| soap_body_begin_out(soap)

|| soap_put___wsdd__Probe(soap, &soap_tmp___wsdd__Probe, "-wsdd:Probe", "")

|| soap_body_end_out(soap)

|| soap_envelope_end_out(soap)

|| soap_end_send(soap))

return soap_closesock(soap);

return SOAP_OK;

}

SOAP_FMAC5 int SOAP_FMAC6 soap_recv___wsdd__ProbeMatches(struct soap *soap, struct __wsdd__ProbeMatches *_param_1)

{

soap_default___wsdd__ProbeMatches(soap, _param_1);

soap_begin(soap);

if (soap_begin_recv(soap)

|| soap_envelope_begin_in(soap)

|| soap_recv_header(soap)

|| soap_body_begin_in(soap))

return soap_closesock(soap);

soap_get___wsdd__ProbeMatches(soap, _param_1, "-wsdd:ProbeMatches", NULL);

if (soap->error == SOAP_TAG_MISMATCH && soap->level == 2)

soap->error = SOAP_OK;

if (soap->error

|| soap_body_end_in(soap)

|| soap_envelope_end_in(soap)

|| soap_end_recv(soap))

return soap_closesock(soap);

return soap_closesock(soap);

}

int main()  

{  

struct soap *soap;

struct wsdd__ProbeType req; 

struct __wsdd__ProbeMatches resp;

struct wsdd__ScopesType sScope;

struct SOAP_ENV__Header header;

int count = 0;

int result = 0; 

char guid_string[100];

soap = soap_new(); 

if (soap == NULL)

{

return -1;

}

 

soap_set_namespaces(soap, namespaces); 

soap->recv_timeout = 3; //超過x秒鐘沒有數(shù)據(jù)就退出

soap_default_SOAP_ENV__Header(soap, &header);

 

header.wsa__MessageID = guid_string;

header.wsa__To = "urn:schemas-xmlsoap-org:ws:2005:04:discovery";

header.wsa__Action = "http://schemas.xmlsoap.org/ws/2005/04/discovery/Probe";

soap->header = &header;

soap_default_wsdd__ScopesType(soap, &sScope);

sScope.__item = "";

soap_default_wsdd__ProbeType(soap, &req);

req.Scopes = &sScope;

req.Types = "dn:NetworkVideoTransmitter";

  

  result = soap_send___wsdd__Probe(soap, "soap.udp://239.255.255.250:3702", NULL, &req);

int i = 0,nFindDev=0;

while (i++<10)

{

printf("soap_discovery_recv...\n");

result = soap_recv___wsdd__ProbeMatches(soap,&resp);

if (result == SOAP_OK)

{

if (!(soap->header))

{

printf("continue++++++++++++++++++++++++++++++++++++++++++++++++++++++\n");

continue;

}

nFindDev++;

cout << "=========================================" << endl;

 

cout << "Match size:" << resp.wsdd__ProbeMatches->__sizeProbeMatch << endl;

cout << "xsd-unsignedInt:" << resp.wsdd__ProbeMatches->ProbeMatch->MetadataVersion << endl;

cout << "scopes item:" << resp.wsdd__ProbeMatches->ProbeMatch->Scopes->__item << endl;

cout << "QName:" << resp.wsdd__ProbeMatches->ProbeMatch->Types << endl;

cout << "xsd:string:" << resp.wsdd__ProbeMatches->ProbeMatch->wsa__EndpointReference.Address << endl;

cout << "xsd:QName:" << resp.wsdd__ProbeMatches->ProbeMatch->wsa__EndpointReference.PortType << endl;

cout << "wsa:ServiceNameType:" << resp.wsdd__ProbeMatches->ProbeMatch->wsa__EndpointReference.ServiceName << endl;

cout << "sequence of elements:" << resp.wsdd__ProbeMatches->ProbeMatch->wsa__EndpointReference.__size << endl;

cout << "xsd:anyType:" << resp.wsdd__ProbeMatches->ProbeMatch->wsa__EndpointReference.__anyAttribute << endl;

cout << "endpoint any:" << resp.wsdd__ProbeMatches->ProbeMatch->wsa__EndpointReference.__any << endl;

cout << "wsdd:UriListType:" << resp.wsdd__ProbeMatches->ProbeMatch->XAddrs << endl;

}

else

printf("2soap error: %d, %s, %s@@@@@@@@@@@\n", soap->error, *soap_faultcode(soap), *soap_faultstring(soap)); 

break;

}

printf("exit while,find dev:%d\n", nFindDev);

// remove deserialized class instances (C++ only)

soap_destroy(soap);

// clean up and remove deserialized data

soap_end(soap); 

////////////////////////////////////////////////////////////////////////////

soap_free(soap);//detach and free runtime context

soap_done(soap); // detach context (last use and no longer in scope)

  

    return result;   



文章題目:onvifclientDiscovery實現(xiàn)
網(wǎng)站URL:http://weahome.cn/article/ipssjo.html

其他資訊

在線咨詢

微信咨詢

電話咨詢

028-86922220(工作日)

18980820575(7×24)

提交需求

返回頂部