• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ soap_end函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中soap_end函数的典型用法代码示例。如果您正苦于以下问题:C++ soap_end函数的具体用法?C++ soap_end怎么用?C++ soap_end使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了soap_end函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: ns__awizoDeleteSender

int ns__awizoDeleteSender(struct soap* soap, long id, long* result)
{

/* ------------------------------ */

   long	        longRet   =    0;
   long		attempt	  =    0;
   queueNode_t* iterator  = NULL;
   char*	host	  = NULL;
   struct soap       soap2Eawizo;

/* ------------------------------ */


 attempt = MAX_ATTEMPT;

 soap_init2(&soap2Eawizo,SOAP_C_UTFSTRING,SOAP_C_UTFSTRING);

 iterator = (_GLOBAL_awizoConfig.bmdservers).head;

 for(;;){
  asprintf(&host, "http://%s:%s",((bmdserver_t*)(iterator->node))->addr,((bmdserver_t*)(iterator->node))->port);

  longRet = soap_call_ns__awizoDeleteSender(&soap2Eawizo,host,NULL,id,result); 

  free0(host);

  if (longRet == SOAP_OK) {
	PRINT_INFO("Usunięto wystawcę o ID=%ld\n",id);
	return SOAP_OK;
  }
  else {
	if (iterator->prev){
		iterator=iterator->prev;
		continue;
	}
	else if (--attempt <= 0){
		PRINT_ERROR("Nie udało się nawiązać połączenia z żadnym z serwerów e-Awiz. Error = %d\n", BMD_ERR_OP_FAILED);
		//soap_end(&soap2Eawizo);
		//soap_done(&soap2Eawizo);
		//return soap_receiver_fault(soap, "Nie udało się nawiązać połączenia z żadnym z serwerów e-Awiz.", NULL);
		attempt = MAX_ATTEMPT;
	}
	iterator = (_GLOBAL_awizoConfig.bmdservers).head;
	sleep(1);
  }
 }
	soap_end(&soap2Eawizo);
	soap_done(&soap2Eawizo);

	return SOAP_OK;



}
开发者ID:unizeto,项目名称:bmd,代码行数:55,代码来源:mail_sender_delete_sender.c


示例2: pthread_detach

void *process_request(void *soap) { 

   pthread_detach(pthread_self()); 
   soap_serve((struct soap*)soap); 
   soap_destroy((struct soap*)soap); 
   soap_end((struct soap*)soap); 
   soap_done((struct soap*)soap); 
   free(soap); 

   return NULL; 
}
开发者ID:AlexIbarra,项目名称:p-s-d-1,代码行数:11,代码来源:server.c


示例3: if

int calcService::run(int port)
{	if (soap_valid_socket(this->master) || soap_valid_socket(bind(NULL, port, 100)))
	{	for (;;)
		{	if (!soap_valid_socket(accept()) || serve())
				break;
			soap_destroy(this);
			soap_end(this);
		}
	}
	return this->error;
}
开发者ID:eslinux,项目名称:Windows,代码行数:11,代码来源:soapcalcService.cpp


示例4: simpleGsoap20

inline void simpleGsoap20()
{
	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__simpleGsoap20 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;
	input.att11 = 11;
	input.att12 = 12;
	input.att13 = 13;
	input.att14 = 14;
	input.att15 = 15;
	input.att16 = 16;
	input.att17 = 17;
	input.att18 = 18;
	input.att19 = 19;
	input.att20 = 20;

	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__simpleGsoap20(soap, &input);

		//streambuf.pubseekpos(0);
		//ost->rdbuf(&streambuf);
		//std::cout << "Str: " << streambuf.size() << endl;
		//break;

		soap_read__ns1__simpleGsoap20(soap, &output);
	}

	soap_destroy(soap);
	soap_end(soap);
	soap_done(soap);
}
开发者ID:eProsima,项目名称:Dynamic-Fast-Buffers,代码行数:54,代码来源:main.cpp


示例5: if

int PullPointSubscriptionBindingService::run(int port)
{	if (soap_valid_socket(this->soap->master) || soap_valid_socket(bind(NULL, port, 100)))
	{	for (;;)
		{	if (!soap_valid_socket(accept()) || serve())
				break;
			soap_destroy(this->soap);
			soap_end(this->soap);
		}
	}
	return this->soap->error;
}
开发者ID:hummatli,项目名称:onvif-qt-server-client,代码行数:11,代码来源:onvifeventPullPointSubscriptionBindingService.cpp


示例6: soap_begin

int dpws_discoveryService::serve()
{
#ifndef WITH_FASTCGI
	unsigned int k = this->max_keep_alive;
#endif
	do
	{	soap_begin(this);
#ifdef WITH_FASTCGI
		if (FCGI_Accept() < 0)
		{
			this->error = SOAP_EOF;
			return soap_send_fault(this);
		}
#endif

		soap_begin(this);

#ifndef WITH_FASTCGI
		if (this->max_keep_alive > 0 && !--k)
			this->keep_alive = 0;
#endif

		if (soap_begin_recv(this))
		{	if (this->error < SOAP_STOP)
			{
#ifdef WITH_FASTCGI
				soap_send_fault(this);
#else 
				return soap_send_fault(this);
#endif
			}
			soap_closesock(this);

			continue;
		}

		if (soap_envelope_begin_in(this)
		 || soap_recv_header(this)
		 || soap_body_begin_in(this)
		 || dispatch() || (this->fserveloop && this->fserveloop(this)))
		{
#ifdef WITH_FASTCGI
			soap_send_fault(this);
#else
			return soap_send_fault(this);
#endif
		}

#ifdef WITH_FASTCGI
		soap_destroy(this);
		soap_end(this);
	} while (1);
#else
	} while (this->keep_alive);
开发者ID:119-org,项目名称:TND,代码行数:54,代码来源:Remotedpws_discoveryService.cpp


示例7: soap_destroy

void SoapHandler::CleanSoapEnv()
{
	if ( m_SoapEnv )
	{
		soap_destroy(m_SoapEnv); // dealloc C++ data 
		soap_end(m_SoapEnv); // dealloc data and clean up 
		soap_done(m_SoapEnv); // detach soap struct 
		free(m_SoapEnv);
		m_SoapEnv = NULL;
	}
}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:11,代码来源:SOAPHandler.cpp


示例8: run_serve

int run_serve(int port)
{
  struct soap *soap = soap_new1(SOAP_XML_INDENT);
  int ret;

  if (soap_register_plugin(soap, http_da))
    exit(1);

  if (!soap_valid_socket(soap_bind(soap, NULL, port, 100)))
    soap_print_fault(soap, stderr);
  else
  {
    fprintf(stderr, "Bind to port %d successful\n", port);
    soap->accept_timeout = 3600; /* let server time out after one hour */
    for (;;)
    {
      SOAP_SOCKET sock = soap_accept(soap);
      if (!soap_valid_socket(sock))
      {
        if (soap->errnum)
          soap_print_fault(soap, stderr);
        else
        {
	  fprintf(stderr, "Server timed out\n");
          break;
        }
      }
      fprintf(stderr, "Accepting socket %d connection from IP %d.%d.%d.%d\n", sock, (int)(soap->ip>>24)&0xFF, (int)(soap->ip>>16)&0xFF, (int)(soap->ip>>8)&0xFF, (int)soap->ip&0xFF);
      if (soap_serve(soap))
        soap_print_fault(soap, stderr);
      fprintf(stderr, "Served\n\n");
      soap_destroy(soap);
      soap_end(soap);
    } 
  }
  ret = soap->error;
  soap_destroy(soap);
  soap_end(soap);
  soap_free(soap);
  return ret;
}
开发者ID:latelee,项目名称:onvif_fw_stl,代码行数:41,代码来源:httpdatest.c


示例9: rmc_unregister_alias

rmc_unregister_alias (const char *guid, const char *lfn, char *errbuf, int errbufsz)
{
	struct rmc__removeAliasResponse out;
	int ret;
	struct soap soap;

	if (rmc_init (&soap, errbuf, errbufsz) < 0)
		return (-1);

	if ((ret = soap_call_rmc__removeAlias (&soap, rmc_endpoint, "",
				(char *) guid, (char *) lfn, &out))) {
		gfal_errmsg (errbuf, errbufsz, GFAL_ERRLEVEL_ERROR, "%s", soap.fault->faultstring);
		soap_end (&soap);
		soap_done (&soap);
		errno = ECOMM;
		return (-1);
	}
	soap_end (&soap);
	soap_done (&soap);
	return (0);
}
开发者ID:ic-hep,项目名称:emi3,代码行数:21,代码来源:rmc_ifce.c


示例10: soap_destroy

dli::DataLocationInterfaceSOAP::~DataLocationInterfaceSOAP()
{
  // Finalise SOAP
  //
  soap_destroy(&m_soap);
  soap_end(&m_soap);
  soap_done(&m_soap);

  if (m_ctx) {
    glite_gsplugin_free_context(m_ctx);
  }
} // destructor
开发者ID:italiangrid,项目名称:org.glite.wms,代码行数:12,代码来源:DataLocationInterfaceSOAP.cpp


示例11: VERB_LOG

// WS_QUERY_BY_KEY (CLIENT SIDE)
void audioDB::ws_query_by_key(const char*dbName, const char *trackKey, const char* featureFileName, const char* hostport){
  struct soap soap;
  adb__queryResponse adbQueryResponse;  
  /*  JUST TRY TO USE A DATA STRUCTURE WITH PHP
      adb__sequenceQueryParms asqp;
      asqp.keyList = (char*)trackFileName;
      asqp.timesFileName = (char*)timesFileName;
      asqp.queryPoint = queryPoint;
      asqp.pointNN = pointNN;
      asqp.trackNN = trackNN;
      asqp.sequenceLength = sequenceLength;
      asqp.radius = radius;
      asqp.relative_threshold = relative_threshold;
      asqp.absolute_threshold = absolute_threshold;
      asqp.usingQueryPoint = usingQueryPoint;
      asqp.lsh_exact = lsh_exact;
  */
  VERB_LOG(1, "Calling %s query on database %s with %s=%s\n", (trackKey&&strlen(trackKey))?"KEY":"FILENAME", dbName, (trackKey&&strlen(trackKey))?"KEY":"FILENAME",(trackKey&&strlen(trackKey))?trackKey:featureFileName);
  soap_init(&soap);  
  if(queryType==O2_SEQUENCE_QUERY || queryType==O2_N_SEQUENCE_QUERY){
    if(soap_call_adb__sequenceQueryByKey(&soap,hostport,NULL,
					 (char*)dbName,
					 (char*)trackKey,
					 (char*)featureFileName,
					 queryType,
					 (char*)trackFileName, // this means keyFileName 
					 (char*)timesFileName,
					   queryPoint,
					 pointNN,
					 trackNN,
					 sequenceLength,
					 radius,
					 absolute_threshold,
					 usingQueryPoint,
					 lsh_exact,
					 no_unit_norming,
					 adbQueryResponse)==SOAP_OK){
      //std::std::cerr << "result list length:" << adbQueryResponse.result.__sizeRlist << std::std::endl;
      for(int i=0; i<adbQueryResponse.result.__sizeRlist; i++)
	std::cout << adbQueryResponse.result.Rlist[i] << " " << adbQueryResponse.result.Dist[i] 
		  << " " << adbQueryResponse.result.Qpos[i] << " " << adbQueryResponse.result.Spos[i] << std::endl;
    } else {
      char fault[MAXSTR];
      soap_sprint_fault(&soap, fault, MAXSTR);
      error(fault);
    }
  } else
    ;// FIX ME: WRITE NON-SEQUENCE QUERY BY KEY ?
  
  soap_destroy(&soap);
  soap_end(&soap);
  soap_done(&soap);
}
开发者ID:bregmanstudio,项目名称:AVA,代码行数:54,代码来源:soap.cpp


示例12: main

int main(int argc, char **argv)
{ struct soap *soap = soap_new();
  const char *endpoint;
  matrix a(soap, 3); // matrix with 3 rows created in current soap env.
  // set up matrix by specifying non-zero elements only (this is optional)
  a[1].resize(1,2); // 2-element vector indexed from 1 to 2
  a[1][1] = 2;
  a[1][2] = 1;
  a[2].resize(1,3); // 3-element vector
  a[2][1] = 1;
  a[2][2] = 2;
  a[2][3] = 1;
  a[3].resize(2,3); // 2-element vector indexed from 2 to 3
  a[3][2] = 1;
  a[3][3] = 2;
  cout << "* Demonstration example *" << endl;
  cout << "Matrix:" << endl;
  a.print();
  vector b(soap, 3);
  b[1] = 1;
  b[2] = 2;
  b[3] = 3;
  cout << "Vector:" << endl;
  b.print();
  vector x(soap);
  if (argc < 2)
    endpoint = luserver;
  else
    endpoint = argv[1];
  /* solve ax=b */
  if (soap_call_ns1__lusol(soap, endpoint, "", &a, &b, &x))
  { soap_print_fault(soap, stderr);
    soap_print_fault_location(soap, stderr);
  }
  else
  { cout << "Solution vector from service:" << endl;
    x.print();
  }
  matrix a1(soap);
  if (soap_call_ns1__luinv(soap, endpoint, "", &a, &a1))
  { soap_print_fault(soap, stderr);
    soap_print_fault_location(soap, stderr);
  }
  else
  { cout << "Inverse matrix matrix from service:" << endl;
    a1.print();
  }
  soap_destroy(soap);
  soap_end(soap);
  free(soap);
  return 0;
}
开发者ID:carriercomm,项目名称:PrologMUD,代码行数:52,代码来源:luclient.cpp


示例13: main

int main()
{ struct soap soap;
  soap_init2(&soap, SOAP_IO_KEEPALIVE, SOAP_IO_KEEPALIVE);
  if (soap_send_ns__handle(&soap, event_handler_endpoint, event_handler_action, EVENT_A))
    soap_print_fault(&soap, stderr);
  if (synchronous && soap_recv_empty_response(&soap))
    soap_print_fault(&soap, stderr);
  if (soap_send_ns__handle(&soap, event_handler_endpoint, event_handler_action, EVENT_B))
    soap_print_fault(&soap, stderr);
  if (synchronous && soap_recv_empty_response(&soap))
    soap_print_fault(&soap, stderr);
  /* reset keep-alive when client needs to inform the server that it will close the connection. It may reconnect later */
  soap_clr_omode(&soap, SOAP_IO_KEEPALIVE);
  if (soap_send_ns__handle(&soap, event_handler_endpoint, event_handler_action, EVENT_C))
    soap_print_fault(&soap, stderr);
  if (synchronous && soap_recv_empty_response(&soap))
    soap_print_fault(&soap, stderr);
  /* close the socket */
  soap_closesock(&soap);
  /* enable keep-alive which is required to accept and execute multiple receives */
  soap_set_omode(&soap, SOAP_IO_KEEPALIVE);
  if (soap_send_ns__handle(&soap, event_handler_endpoint, event_handler_action, EVENT_Z))
    soap_print_fault(&soap, stderr);
  else
  { struct ns__handle response;
    for (;;)
    { if (!soap_valid_socket(soap.socket))
      { fprintf(stderr, "Connection was terminated (keep alive disabled?)\n");
        break;
      }
      if (soap_recv_ns__handle(&soap, &response))
      { if (soap.error == SOAP_EOF)
          fprintf(stderr, "Connection was gracefully closed by server\n");
        else
	  soap_print_fault(&soap, stderr);
	break;
      }
      else
      { switch (response.event)
        { case EVENT_A: fprintf(stderr, "Client Event: A\n"); break;
          case EVENT_B: fprintf(stderr, "Client Event: B\n"); break;
          case EVENT_C: fprintf(stderr, "Client Event: C\n"); break;
          case EVENT_Z: fprintf(stderr, "Client Event: Z\n"); break;
        }
      }
    }
  }
  soap_closesock(&soap); /* soap_send operations keep the socket open to possibly accept responses, so we need to explicitly close the socket now */
  soap_end(&soap); /* this will close the socket too (if keep alive is off), just in case */
  soap_done(&soap); /* detach environment (also closes sockets even with keep-alive) */
  return 0;
}
开发者ID:xin3liang,项目名称:platform_external_gsoap,代码行数:52,代码来源:event.c


示例14: lrc_guid_exists

lrc_guid_exists (const char *guid, char *errbuf, int errbufsz)
{
	struct lrc__guidExistsResponse out;
	int ret;
	struct soap soap;

	if (lrc_init (&soap, errbuf, errbufsz) < 0)
		return (-1);

	if ((ret = soap_call_lrc__guidExists (&soap, lrc_endpoint, "",
				(char *) guid, &out))) {
		gfal_errmsg (errbuf, errbufsz, GFAL_ERRLEVEL_ERROR, "%s", soap.fault->faultstring);
		soap_end (&soap);
		soap_done (&soap);	
		errno = ECOMM;
		return (-1);
	}
	ret = out._guidExistsReturn ? 1 : 0;
	soap_end (&soap);
	soap_done (&soap);
	return (ret);
}
开发者ID:ic-hep,项目名称:emi3,代码行数:22,代码来源:lrc_ifce.c


示例15: if

int videooverlayService::run(int port)
{	if (soap_valid_socket(this->master) || soap_valid_socket(bind(NULL, port, 100)))
	{	for (;;)
		{	if (!soap_valid_socket(accept()) || serve())
				return this->error;
			soap_destroy(this);
			soap_end(this);
		}
	}
	else
		return this->error;
	return SOAP_OK;
}
开发者ID:wyrover,项目名称:DESKTOP-1,代码行数:13,代码来源:soapvideooverlayService.cpp


示例16: if

int projectstatsService::run(int port)
{	if (soap_valid_socket(bind(NULL, port, 100)))
	{	for (;;)
		{	if (!soap_valid_socket(accept()) || serve())
				return this->error;
			soap_destroy(this);
			soap_end(this);
		}
	}
	else
		return this->error;
	return SOAP_OK;
}
开发者ID:lbproductions,项目名称:ProjectStats,代码行数:13,代码来源:soapprojectstatsService.cpp


示例17: if

int WSHttpBinding_USCOREINWNMasterServerAPIService::run(int port)
{	if (soap_valid_socket(this->master) || soap_valid_socket(bind(NULL, port, 100)))
	{	for (;;)
		{	if (!soap_valid_socket(accept()) || serve())
				return this->error;
			soap_destroy(this);
			soap_end(this);
		}
	}
	else
		return this->error;
	return SOAP_OK;
}
开发者ID:HellSinker,项目名称:nwncx,代码行数:13,代码来源:soapWSHttpBinding_USCOREINWNMasterServerAPIService.cpp


示例18: if

int BasicHttpBinding_USCOREICalculatorService::run(int port)
{   if (soap_valid_socket(this->soap->master) || soap_valid_socket(bind(NULL, port, 100)))
    {   for (;;)
        {   if (!soap_valid_socket(accept()) || serve())
                return this->soap->error;
            soap_destroy(this->soap);
            soap_end(this->soap);
        }
    }
    else
        return this->soap->error;
    return SOAP_OK;
}
开发者ID:gauge2009,项目名称:RPC,代码行数:13,代码来源:soapBasicHttpBinding_USCOREICalculatorService.cpp


示例19: main

int main(int argc, char **argv)
{ struct soap soap;
  struct ns__echoString r;
  soap_init(&soap);
  soap_register_plugin(&soap, http_md5);
  if (argc < 2)
    soap_serve(&soap);
  else if (soap_call_ns__echoString(&soap, "http://", NULL, argv[1], &r))
    soap_print_fault(&soap, stderr);
  soap_end(&soap);
  soap_done(&soap);
  return 0;
}
开发者ID:tcdog001,项目名称:apv5sdk-v15,代码行数:13,代码来源:httpmd5test.c


示例20: query_example_dump

/*
 * dump the XML query with the example data
 */
static int query_example_dump(struct soap *soap, int fd) {
	struct _jpelem__QueryJobs qj;
	int retval;

	memset(&qj, 0, sizeof(qj));

	soap_begin(soap);
	query_example_fill(soap, &qj);
	retval = query_dump(soap, fd, &qj);
	soap_end(soap);

	return retval;
}
开发者ID:CESNET,项目名称:glite-jp,代码行数:16,代码来源:jpis-client.c



注:本文中的soap_end函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ soap_end_recv函数代码示例发布时间:2022-05-30
下一篇:
C++ soap_done函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap