本文整理汇总了C++中soap_destroy函数的典型用法代码示例。如果您正苦于以下问题:C++ soap_destroy函数的具体用法?C++ soap_destroy怎么用?C++ soap_destroy使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了soap_destroy函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: pthread_detach
void *process_request(void *soap)
{ pthread_detach(pthread_self());
/* Serve request (or multiple requests with keep-alive enabled) */
soap_serve((struct soap*)soap);
/* Cleanup and delete deserialized data */
soap_destroy((struct soap*)soap);
soap_end((struct soap*)soap);
/* Detach thread's copy of soap environment */
soap_done((struct soap*)soap);
/* Free soap environment */
free(soap);
fprintf(stderr, "done\n");
return NULL;
}
开发者ID:BioinformaticsArchive,项目名称:KBWS,代码行数:14,代码来源:mtom-stream-test.c
示例2: ACE_TRACE
void TCSoapRunnable::process_message(ACE_Message_Block* mb)
{
ACE_TRACE (ACE_TEXT ("SOAPWorkingThread::process_message"));
struct soap* soap;
ACE_OS::memcpy(&soap, mb->rd_ptr (), sizeof(struct soap*));
mb->release();
soap_serve(soap);
soap_destroy(soap); // dealloc C++ data
soap_end(soap); // dealloc data and clean up
soap_done(soap); // detach soap struct
free(soap);
}
开发者ID:smaitlx,项目名称:Origin-Engine,代码行数:14,代码来源:TCSoap.cpp
示例3: main
int main(int argc, char **argv)
{ struct soap soap;
// use HTTP 1.1 chunking
// HTTP chunking allows streaming of DIME content without requiring DIME attachment size to be set
// DIME attachments can be streamed without chunking ONLY if the attachment size is set
soap_init1(&soap, SOAP_IO_CHUNK);
// set DIME callbacks
soap.fdimereadopen = dime_read_open;
soap.fdimereadclose = dime_read_close;
soap.fdimeread = dime_read;
soap.fdimewriteopen = dime_write_open;
soap.fdimewriteclose = dime_write_close;
soap.fdimewrite = dime_write;
// connect timeout value (not supported by Linux)
soap.connect_timeout = 10;
// IO timeouts
soap.send_timeout = 30;
soap.recv_timeout = 30;
// Unix/Linux SIGPIPE, this is OS dependent:
// soap.accept_flags = SO_NOSIGPIPE; // some systems like this
// soap.socket_flags = MSG_NOSIGNAL; // others need this
// signal(SIGPIPE, sigpipe_handle); // or a sigpipe handler (portable)
if (argc < 3)
{ char *name;
if (argc < 2)
name = "image.jpg";
else
name = argv[1];
getImage(&soap, name);
}
else
{ switch (argv[1][1])
{ case 'p':
endpoint = localhost;
putData(&soap, argc, argv);
break;
case 'g':
endpoint = localhost;
getData(&soap, argc, argv);
break;
default:
fprintf(stderr, "Usage: [-p] [-g] name ...\n");
exit(0);
}
}
soap_destroy(&soap);
soap_end(&soap);
soap_done(&soap);
return SOAP_OK;
}
开发者ID:xin3liang,项目名称:platform_external_gsoap,代码行数:50,代码来源:dimeclient.cpp
示例4: if
int ConsoleObserverService::run(int port)
{ if (soap_valid_socket(bind(NULL, port, 100)))
{ for (;;)
{ if (!soap_valid_socket(accept()))
return this->error;
(void)serve();
soap_destroy(this);
soap_end(this);
}
}
else
return this->error;
return SOAP_OK;
}
开发者ID:Vaa3D,项目名称:v3d_external,代码行数:14,代码来源:obsConsoleObserverService.cpp
示例5: grisu_stop
void grisu_stop(void)
{
/* grisu */
g_free(grisu_username);
g_free(grisu_password);
g_free(grisu_server);
g_free(grisu_port);
g_free(grisu_soap_header);
g_free(grisu_cert_path);
/* soap */
soap_destroy(&soap);
soap_end(&soap);
soap_done(&soap);
}
开发者ID:Bhattiasif,项目名称:gdis,代码行数:15,代码来源:grisu_client.c
示例6: main
int main(int argc, char **argv)
{ struct soap *soap = soap_new();
float q;
if (argc <= 2)
{ soap->user = soap_new(); // pass a new gSOAP environment which we need to make server-side client calls
soap_serve(soap); // serve request
soap_destroy((struct soap*)soap->user);
soap_end((struct soap*)soap->user);
soap_done((struct soap*)soap->user);
free(soap->user);
soap->user = NULL;
}
else if (soap_call_ns3__getQuote(soap, endpoint, NULL, argv[1], argv[2], q) == 0)
printf("\nCompany %s: %f (%s)\n", argv[1], q, argv[2]);
else
{ soap_print_fault(soap, stderr);
soap_print_fault_location(soap, stderr);
}
soap_destroy(soap);
soap_end(soap);
soap_done(soap);
free(soap);
return 0;
}
开发者ID:xin3liang,项目名称:platform_external_gsoap,代码行数:24,代码来源:quotex.cpp
示例7: dequeue
void *process_queue(void *soap)
{
struct soap *tsoap = (struct soap*)soap;
for (;;)
{
tsoap->socket = dequeue();
if (!soap_valid_socket(tsoap->socket))
break;
soap_serve(tsoap);
soap_destroy(tsoap);
soap_end(tsoap);
fprintf(stderr, "served\n");
}
return NULL;
}
开发者ID:huangtsehui,项目名称:MUser,代码行数:15,代码来源:MUser2.cpp
示例8: glite_delegation_free
void glite_delegation_free(glite_delegation_ctx *ctx)
{
if(!ctx)
return;
free(ctx->endpoint);
free(ctx->error_message);
if(ctx->soap)
{
soap_destroy(ctx->soap);
soap_end(ctx->soap);
free(ctx->soap);
}
free(ctx);
}
开发者ID:ic-hep,项目名称:emi3,代码行数:15,代码来源:delegation_simple_api.c
示例9: main
int main(int argc, char **argv)
{ int m, s;
struct soap soap;
soap_init(&soap);
// cookie domain for CGI must be the current host name:
// soap.cookie_domain = "www.cs.fsu.edu";
// Cookie domain for stand-alone server:
soap.cookie_domain = "localhost:8080";
// the path which is used to filter/set cookies with this destination
soap.cookie_path = "/";
if (argc < 2)
{ // CGI app: grab cookies from 'HTTP_COOKIE' env var
soap_getenv_cookies(&soap);
soap_serve(&soap);
}
else
{ int port;
char buf[100];
port = atoi(argv[1]);
m = soap_bind(&soap, NULL, port, 100);
if (m < 0)
{ soap_print_fault(&soap, stderr);
exit(1);
}
sprintf(buf, "localhost:%d", port);
soap.cookie_domain = buf;
fprintf(stderr, "Socket connection successful %d\n", m);
for (int i = 1; ; i++)
{ s = soap_accept(&soap);
if (s < 0)
exit(-1);
fprintf(stderr, "%d: accepted %d IP=%d.%d.%d.%d ... ", i, s, (int)(soap.ip>>24)&0xFF, (int)(soap.ip>>16)&0xFF, (int)(soap.ip>>8)&0xFF, (int)soap.ip&0xFF);
if (!soap_serve(&soap))
fprintf(stderr, "served\n");
else
soap_print_fault(&soap, stderr);
// clean up
soap_destroy(&soap);
soap_end(&soap);
// remove all old cookies from database so no interference when new
// requests with new cookies arrive
soap_free_cookies(&soap);
// Note: threads can have their own cookie DB which they need to cleanup
// before they terminate
}
}
return 0;
}
开发者ID:allenway,项目名称:onvif,代码行数:48,代码来源:ckserver.cpp
示例10: soap_new__tptz__GetConfiguration
int OnvifClientPTZ::getConfiguration(std::string configurationToken){
if (SOAP_OK != soap_wsse_add_UsernameTokenDigest(proxyPTZ.soap, NULL, _user.c_str(), _password.c_str())){
return -1;
}
_tptz__GetConfiguration *tptz__GetConfiguration = soap_new__tptz__GetConfiguration(soap,-1);
_tptz__GetConfigurationResponse *tptz__GetConfigurationResponse = soap_new__tptz__GetConfigurationResponse(soap,-1);
tptz__GetConfiguration->PTZConfigurationToken = configurationToken;
if(SOAP_OK == proxyPTZ.GetConfiguration(tptz__GetConfiguration, tptz__GetConfigurationResponse)){
std::cout << std::endl;
std::cout << "Absolute Pan Tilt Position Space: " << tptz__GetConfigurationResponse->PTZConfiguration->DefaultAbsolutePantTiltPositionSpace-> c_str() << std::endl;
std::cout << "Absolute Zoom Position Space: " << tptz__GetConfigurationResponse->PTZConfiguration->DefaultAbsoluteZoomPositionSpace-> c_str() << std::endl;
std::cout << "Relative Pan Tilt Translation Space: " << tptz__GetConfigurationResponse->PTZConfiguration->DefaultRelativeZoomTranslationSpace->c_str() << std::endl;
std::cout << "Relative Zoom Translation Space: " << tptz__GetConfigurationResponse->PTZConfiguration->DefaultContinuousPanTiltVelocitySpace->c_str() << std::endl;
std::cout << "Continuous Pan Tilt Velocity Space: " << tptz__GetConfigurationResponse->PTZConfiguration->DefaultContinuousZoomVelocitySpace->c_str() << std::endl;
std::cout << "Continuous Zoom Velocity Space: " << tptz__GetConfigurationResponse->PTZConfiguration->DefaultContinuousZoomVelocitySpace->c_str() << std::endl << std::endl;
printf("Default PTZ Timeout: %ds\n", *tptz__GetConfigurationResponse->PTZConfiguration->DefaultPTZTimeout/1000);
printf("Pan Min Limit: %f\n", tptz__GetConfigurationResponse->PTZConfiguration->PanTiltLimits->Range->XRange->Min);
printf("Pan Max Limit: %f\n", tptz__GetConfigurationResponse->PTZConfiguration->PanTiltLimits->Range->XRange->Max);
printf("Tilt Min limit: %f\n", tptz__GetConfigurationResponse->PTZConfiguration->PanTiltLimits->Range->YRange->Min);
printf("Tilt Max limit: %f\n", tptz__GetConfigurationResponse->PTZConfiguration->PanTiltLimits->Range->YRange->Max);
std::cout << "Coordinate System: " << tptz__GetConfigurationResponse->PTZConfiguration->PanTiltLimits->Range->URI.c_str() << std::endl;
std::cout << std::endl;
printf("Zoom Min limit: %f\n", tptz__GetConfigurationResponse->PTZConfiguration->ZoomLimits->Range->XRange->Min);
printf("Zoom Max limit: %f\n", tptz__GetConfigurationResponse->PTZConfiguration->ZoomLimits->Range->XRange->Max);
printf("Default Pan Speed: %f\n", tptz__GetConfigurationResponse->PTZConfiguration->DefaultPTZSpeed->PanTilt->x);
printf("Default Tilt Speed: %f\n", tptz__GetConfigurationResponse->PTZConfiguration->DefaultPTZSpeed->PanTilt->y);
std::cout << "Coordinate System: " << tptz__GetConfigurationResponse->PTZConfiguration->DefaultPTZSpeed->PanTilt->space->c_str() << std::endl;
printf("Default Zoom Speed: %f\n", tptz__GetConfigurationResponse->PTZConfiguration->DefaultPTZSpeed->Zoom->x);
std::cout << "Coordinate System: " << tptz__GetConfigurationResponse->PTZConfiguration->DefaultPTZSpeed->Zoom->space->c_str() << std::endl;
std::cout << std::endl << std::endl;
}else{
//PrintErr(proxyPTZ.soap);
}
soap_destroy(soap);
soap_end(soap);
}
开发者ID:ssig,项目名称:ssig-onvif,代码行数:48,代码来源:OnvifClientPTZ.cpp
示例11: innersimpleGsoap2
inline void innersimpleGsoap2()
{
struct soap *soap = soap_new();
soap_init(soap);
soap_set_omode(soap, SOAP_XML_GRAPH);
soap_imode(soap, SOAP_XML_GRAPH);
soap_begin(soap);
_ns1__outersimpleGsoap2 input, output;
input.soap = soap;
ns1__innersimpleGsoap2 inner1;
inner1.soap = soap;
inner1.att1 = 1;
inner1.att2 = 2;
ns1__innersimpleGsoap2 inner2;
inner2.soap = soap;
inner2.att1 = 1;
inner2.att2 = 2;
input.att1 = &inner1;
input.att2 = &inner2;
boost::asio::streambuf streambuf;
std::ostream *ost = new std::ostream(&streambuf);
std::istream *ist = new std::istream(&streambuf);
input.soap->os = ost;
input.soap->is = ist;
boost::timer::auto_cpu_timer t;
for(int i=0; i < NUMBER_OF_LOOPS; ++i){
soap_write__ns1__outersimpleGsoap2(soap, &input);
//streambuf.pubseekpos(0);
//ost->rdbuf(&streambuf);
//std::cout << "Str: " << streambuf.size() << endl;
//break;
soap_read__ns1__outersimpleGsoap2(soap, &output);
}
soap_destroy(soap);
soap_end(soap);
soap_done(soap);
}
开发者ID:eProsima,项目名称:Dynamic-Fast-Buffers,代码行数:47,代码来源:main.cpp
示例12: complexGsoap2
inline void complexGsoap2()
{
struct soap *soap = soap_new();
soap_init(soap);
soap_set_omode(soap, SOAP_XML_GRAPH);
soap_imode(soap, SOAP_XML_GRAPH);
soap_begin(soap);
_ns1__complexGsoap2 input, output;
input.soap = soap;
input.att1 = 0;
input.att2 = 1;
input.att3 = 0;
input.att4 = 1;
input.att5 = "TEST 0";
input.att6 = "TEST 1";
input.att7 = 2.5;
input.att8 = 3.6;
input.att9 = 27.1;
input.att10 = 28.2;
input.att11 = true;
input.att12 = true;
boost::asio::streambuf streambuf;
std::ostream *ost = new std::ostream(&streambuf);
std::istream *ist = new std::istream(&streambuf);
input.soap->os = ost;
input.soap->is = ist;
boost::timer::auto_cpu_timer t;
for(int i=0; i < NUMBER_OF_LOOPS; ++i){
soap_write__ns1__complexGsoap2(soap, &input);
//streambuf.pubseekpos(0);
//ost->rdbuf(&streambuf);
//std::cout << "Str: " << streambuf.size() << endl;
//break;
soap_read__ns1__complexGsoap2(soap, &output);
}
soap_destroy(soap);
soap_end(soap);
soap_done(soap);
}
开发者ID:eProsima,项目名称:Dynamic-Fast-Buffers,代码行数:46,代码来源:main.cpp
示例13: pthread_detach
static void *_working_proc(void *param)
#endif // win32
{
struct soap *soap = (struct soap*)param;
#ifdef WIN32
#else
pthread_detach(pthread_self());
#endif//
soap_serve((struct soap*)soap);
soap_destroy((struct soap*)soap); // dealloc C++ data
soap_end((struct soap*)soap); // dealloc data and clean up
soap_done((struct soap*)soap); // detach soap struct
soap_free(soap);
return NULL;
}
开发者ID:sunkwei,项目名称:sysmgrt,代码行数:17,代码来源:main.c
示例14: send
void send(const std::string& message)
{
struct soap account_info_soap;
soap_init(&account_info_soap);
if (soap_ssl_client_context(&account_info_soap,
SOAP_SSL_DEFAULT | SOAP_SSL_ALLOW_EXPIRED_CERTIFICATE,
"client.key", /* keyfile: required only when client must authenticate to server (see SSL docs on how to obtain this file) */
NULL, /* password to read the key file (not used with GNUTLS) */
"server.crt", /* cacert file to store trusted certificates (needed to verify server) */
NULL, /* capath to directory with trusted certificates */
NULL /* if randfile!=NULL: use a file with random data to seed randomness */
))
{
printf("Init soap ssl client context error \n");
return;
}
std::string server = "https://172.18.15.7/pmec/mid/trade/";
std::string result;
account_info_soap.userid = "1";
account_info_soap.passwd = "cpp";
account_info_soap.connect_timeout = 60; /* try to connect for 1 minute */
account_info_soap.send_timeout = account_info_soap.recv_timeout = 30; /* if I/O stalls, then timeout after 30 seconds */
if (soap_call_ns__trade(&account_info_soap, server.c_str(), NULL, message, &result) == SOAP_OK)
{
printf("result is %s, thread id = %lu\n", result.c_str(), pthread_self());
}
else
{
soap_print_fault(&account_info_soap, stderr);
}
soap_destroy(&account_info_soap); /* C++ */
soap_end(&account_info_soap);
soap_done(&account_info_soap);
//soap_free(&account_info_soap);
usleep(1);
}
开发者ID:uglychen,项目名称:chenxun,代码行数:45,代码来源:cgi_client_multi.cpp
示例15: ONVIF_SEARCH_GetServiceCapabilities
int ONVIF_SEARCH_GetServiceCapabilities(char *username, char *password, char *searchService)
{
int retval = 0;
struct soap *soap = NULL;
struct _tse__GetServiceCapabilities search_GetServiceCapabilities_req;
struct _tse__GetServiceCapabilitiesResponse search_GetServiceCapabilities_resp;
struct SOAP_ENV__Header header;
UserInfo_S stUserInfo;
memset(&stUserInfo, 0, sizeof(UserInfo_S));
strcpy(stUserInfo.username, username);
strcpy(stUserInfo.password, password);
memset(&header,0,sizeof(header));
soap = ONVIF_Initsoap(&header, NULL, NULL, 5, &stUserInfo);
char *soap_endpoint = (char *)malloc(256);
memset(soap_endpoint, '\0', 256);
sprintf(soap_endpoint, "%s", searchService);
const char *soap_action = "http://www.onvif.org/ver20/search/wsdl/GetServiceCapabilities";
do
{
soap_call___tse__GetServiceCapabilities(soap, soap_endpoint, soap_action, &search_GetServiceCapabilities_req, &search_GetServiceCapabilities_resp);
if (soap->error)
{
printf("[%s][%d]--->>> soap error: %d, %s, %s\n", __func__, __LINE__, soap->error, *soap_faultcode(soap), *soap_faultstring(soap));
retval = soap->error;
return retval;
}
else
{
printf("[%s][%d] success !\n", __func__, __LINE__);
}
}while(0);
free(soap_endpoint);
soap_endpoint = NULL;
soap_destroy(soap);
return retval;
}
开发者ID:MyungSinKim,项目名称:TXOnvif,代码行数:45,代码来源:search.c
示例16: main
int main()
{ struct soap soap;
init_received();
soap_init1(&soap, SOAP_IO_UDP);
if (!soap_valid_socket(soap_bind(&soap, NULL, 10000, 100)))
{ soap_print_fault(&soap, stderr);
exit(1);
}
for (;;)
{ printf("Accepting requests...\n");
if (soap_serve(&soap))
soap_print_fault(&soap, stderr);
soap_destroy(&soap);
soap_end(&soap);
}
soap_done(&soap);
return 0;
}
开发者ID:119-org,项目名称:TND,代码行数:18,代码来源:udpserver.c
示例17: simpleGsoap10
inline void simpleGsoap10()
{
struct soap *soap = soap_new();
soap_init(soap);
soap_set_omode(soap, SOAP_XML_GRAPH);
soap_imode(soap, SOAP_XML_GRAPH);
soap_begin(soap);
_ns1__simpleGsoap10 input, output;
input.soap = soap;
input.att1 = 1;
input.att2 = 2;
input.att3 = 3;
input.att4 = 4;
input.att5 = 5;
input.att6 = 6;
input.att7 = 7;
input.att8 = 8;
input.att9 = 9;
input.att10 = 10;
boost::asio::streambuf streambuf;
std::ostream *ost = new std::ostream(&streambuf);
std::istream *ist = new std::istream(&streambuf);
input.soap->os = ost;
input.soap->is = ist;
boost::timer::auto_cpu_timer t;
for(int i=0; i < NUMBER_OF_LOOPS; ++i){
soap_write__ns1__simpleGsoap10(soap, &input);
//streambuf.pubseekpos(0);
//ost->rdbuf(&streambuf);
//std::cout << "Str: " << streambuf.size() << endl;
//break;
soap_read__ns1__simpleGsoap10(soap, &output);
}
soap_destroy(soap);
soap_end(soap);
soap_done(soap);
}
开发者ID:eProsima,项目名称:Dynamic-Fast-Buffers,代码行数:44,代码来源:main.cpp
示例18: pthread_detach
void *process_request(void *soap)
{
#ifdef _POSIX_THREADS
pthread_detach(pthread_self());
#endif
soap_ssl_accept((struct soap*)soap);
// serve request (or multiple requests with keep-alive enabled)
soap_serve((struct soap*)soap);
// cleanup class instances
soap_destroy((struct soap*)soap);
// cleanup
soap_end((struct soap*)soap);
// detach and free thread's copy of soap environment
soap_free((struct soap*)soap);
return NULL;
}
开发者ID:eslinux,项目名称:Windows,代码行数:19,代码来源:CenticFirewallApp.cpp
示例19: DSL_CPE_SOAP
static DSL_int_t DSL_CPE_SOAP(DSL_CPE_Thread_Params_t *param)
{
Soap_env_t *pSoapEnv = (Soap_env_t *)param->nArg1;
int s; /* slave socket */
int ret = 0;
pSoapEnv->pid = DSL_CPE_ThreadIdGet();
pSoapEnv->server.soap.user = (DSL_void_t *)pSoapEnv;
if ( ((Soap_env_t *)param->nArg1) == DSL_NULL)
{
return -1;
}
while (pSoapEnv->bRun)
{
s = soap_accept (&pSoapEnv->server.soap);
if ( s < 0 )
{
if (pSoapEnv->bRun == 0)
break;
/* timeout -> continue */
/*DSL_CCA_DEBUG(DSL_CCA_DBG_ERR, (DSL_CPE_PREFIX
"SOAP socket time out (error %d)" DSL_CPE_CRLF, s));*/
continue;
}
if (soap_serve(&pSoapEnv->server.soap) != SOAP_OK) /* process RPC request */
{
/*soap_print_fault(&pSoapEnv->server.soap, stderr);*/ /* print error */
}
soap_destroy (&pSoapEnv->server.soap); /* clean up class instances */
soap_end (&pSoapEnv->server.soap);
}
soap_end(&pSoapEnv->server.soap);
soap_done(&pSoapEnv->server.soap); /* close master socket and detach environment */
pSoapEnv->pid = 0;
return ret;
}
开发者ID:ScApi,项目名称:dsl_cpe_control_vrx,代码行数:43,代码来源:dsl_cpe_soap.c
示例20: soap_init
void audioDB::ws_liszt(const char* dbName, char* Hostport){
struct soap soap;
adb__lisztResponse adbLisztResponse;
soap_init(&soap);
if(soap_call_adb__liszt(&soap, hostport, NULL, (char*)dbName, lisztOffset, lisztLength, adbLisztResponse)==SOAP_OK){
for(int i = 0; i < adbLisztResponse.result.__sizeRkey; i++) {
std::cout << "[" << i+lisztOffset << "] " << adbLisztResponse.result.Rkey[i] << " ("
<< adbLisztResponse.result.Rlen[i] << ")" << std::endl;
}
} else {
char fault[MAXSTR];
soap_sprint_fault(&soap, fault, MAXSTR);
error(fault);
}
soap_destroy(&soap);
soap_end(&soap);
soap_done(&soap);
}
开发者ID:bregmanstudio,项目名称:AVA,代码行数:19,代码来源:soap.cpp
注:本文中的soap_destroy函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论