ACE+gSOAPʵÏÖ¸ßÐÔÄÜWebService Server£¨C/C++£©
1¡¢¿ª·¢»·¾³Çë²Î¿¼¡¶´î½¨ACE-5.7.4+VS2008¿ª·¢»·¾³¡·Ò»ÎÄ
2¡¢gSOAP¿â£¬ÏÂÔØµØÖ·£ºhttp://gsoap2.sourceforge.net/£¬±¾ÎÄʹÓõİ汾ÊÇ£ºgsoap_2.7.15£¬gSOAPµÄ±à³Ì¿ÉÒԲο¼docĿ¼ÏµÄsoapdoc2.pdf£¬¹Ù·½ÎĵµÐ´µÄ·Ç³£Ïêϸ¡£
ÈÃÎÒÃÇ¿ªÊ¼gSOAP±àÂëÂọ́º
1¡¢´´½¨gsoap_server.h£º
//gsoap ns2 service namespace: http://localhost:9908/ccm_mimport/services.wsdl
//gsoap ns2 service location: http://localhost:9908/ccm_mimport/services
typedef char * xsd__string; // encode char * value as the xsd:string schema type
typedef int xsd__int; // encode xsd__int value as the xsd:int schema typ
struct ns2__makeCardNotifyReqBean
{
xsd__string id_makecard_order;
xsd__int card_type;
xsd__string file_name;
xsd__string start_card_serial;
xsd__string end_card_serial;
xsd__int card_count;
};
struct ns2__makeCardNotifyRspBean
{
xsd__int result; //½á¹û
xsd__string error_desc; //´íÎóÃèÊö
};
//¿¨Êý¾ÝÉú³É½á¹û֪ͨ½Ó¿Ú
int ns2__makeCardNotify(struct ns2__makeCardNotifyReqBean req, struct ns2__makeCardNotifyRspBean *rsp);
×¢£ºÍ·ÎļþÉÏÃæµÄ×¢ÊÍÓÃÓÚÅäÖ÷þÎñ·ÃÎʵØÖ·£¬¶ø·Çµ¥´¿µÄ×¢ÊÍ£»ÏêϸÅäÖÃ˵Ã÷¿ÉÒԲο¼¹Ù·½Îĵµ
2¡¢°Ñ%GSOAP_HOME%\gsoap\bin\win32Ŀ¼ÅäÖõ½ÏµÍ³%Path%À»òÕß½«Ä¿Â¼ÏµÄsoapcpp2.exeºÍwsdl2h.exeÁ½¸öÎļþÖ±½Ó¿½±´µ½gsoap_server.hËùÔÚĿ¼£»
3¡¢±àдÅú´¦ÀíÎļþ£º
echo off
del *.c *.h *.xml *.nsmap *.cpp
soapcpp2 -c -S gsoap_server.h
copy soapC.c ..\soapC.cpp
copy soapServer.c ..\soapServer.cpp
copy soapH.h ..\soapH.h
copy soapStub.h ..\soapStub.h
copy ns2.nsmap ..\gsoap_server.nsmap
echo .
echo /******************************/
echo .
echo Éú³ÉµÄns2.wsdl±ØÐëɾ³ýschemaLocation="http://schemas.xmlsoap.org/soap/encoding/"ÊôÐÔ
echo .
echo /******************************/
echo .
pause
4¡¢±àдҵÎñʵÏÖ´úÂ룺
#include <ctype.h>
#include <string>
#include <ace/OS.h>
#include <ace/OS_NS_ctype.h>
#include <ace/OS_NS_string.h>
#include "Global_Define.h"
#include "ffcs_logger.h"
#include "stdsoap2.h"
#include "soapH.h"
#include "gsoap_se
Ïà¹ØÎĵµ£º
µÚÒ»´Î×ÐϸµØ¿´ÕâÖÖ´úÂ룬¶¼ÊÇ´ÓÍøÉϸ´ÖÆ×öÁËÂÔ΢¸Ä¶¯ºóµÄ²úÎï¡£´úÂëÈçÏ£º
#include "reg52.h"
unsigned char Count;
sbit Xiang=P1^2 ; //·äÃùÆ÷Ïì
unsigned char code SONG[] ={
0x26,0x20,0x20,0x20,0x20,0x20,0x26,0x10,0x20,0x10,0x20,0x80,0x26,0x20,0x30,0x20,
0x30,0x20,0x39,0x10,0x30,0x10,0x30,0x80,0x2 ......
»ã±à½ÒÃØCÓïÑÔÖеIJÎÊý´«µÝÎÊÌâ[zz]
ÎÄÕÂ×÷Õߣºcook702
ºÜ¶àѧϰ»ã±àµÄÅóÓÑÏë±Ø¶ÔCÒ²±È½ÏÁ˽⣬ÒòΪÔÚµ±Ç°´óѧµÄ¿Î³ÌÌåϵÀËüºÜÓпÉÄܾÍÊÇÄã½Ó´¥µ½µÄµÚÒ»Ãűà³ÌÓïÑÔ¡£ÓÉÓÚ¶Ô¼ÆËã»úµÄÀí½â²»¹»£¬Ñ§Ï°Ê±±Ø¶¨»áÓöµ½¸÷ÖÖÎÊÌâ¡£ÓÐЩÎÊÌâÊÇÄãͨ¹ý˼¿¼¾Í¿ÉÒÔ½â¾öµÄ£¬¶ø¸ü¶àµÄÎÊÌâÔòÊÇÄãÎÞ´Ó˼¿¼£¬¾ÍºÃÏñËüÌìÉú¾ÍÊÇÕâÑù£¬ÄãÖ»Òª¼ ......
1.10.3£¬voidÖ¸Õë
¡¾¹æÔò 1-35¡¿Ç§ÍòСÐÄÓÖСÐÄʹÓÃvoidÖ¸ÕëÀàÐÍ¡£
°´ÕÕ ANSI(American National Standards Institute)±ê×¼£¬²»ÄÜ¶Ô voidÖ¸Õë½øÐÐËã·¨²Ù×÷£¬¼´ÏÂÁвÙ×÷¶¼ÊDz»ºÏ·¨µÄ£º
void * pvoid;
pvoid++; //ANSI£º´íÎó
pvoid += 1; //ANSI£º´íÎó
ANSI ±ê×¼Ö®ËùÒÔÕâÑùÈ϶¨£¬ÊÇÒòΪËü¼á³Ö£º½øÐÐËã·¨²Ù×÷µÄÖ¸Õë±ØÐëÊ ......
»·¾³ÉèÖãº
°²×°ÍêMySQLÖ®ºó£¬½«°²×°Ä¿Â¼ÖеÄincludeĿ¼ÏµÄlibmysql.libÎļþ¿½µ½VS2008°²×°Ä¿Â¼ÖеÄVC\lib\Ï£¬È»ºóÔÚ ÏîÄ¿-Ñ¡Ïî-c/c++-³£¹æ Öеĸ½¼Ó°üº¬Ä¿Â¼ÒÔ¼° Á´½ÓÆ÷-³£¹æ Öеĸ½¼Ó¿âĿ¼ÖмÓÈë“c:\MySQL\include\”£¬²¢ÇÒÔÚ Á´½ÓÆ÷-ÊäÈë Öеĸ½¼ÓÒÀÀµÏîÄÚÌí¼Ó“lib ......
Python 3 Êä³öÖØ¶¨ÏòʹÓÃC/C++
By:gddsky
Ä¿±ê
Ï£Íû½«Python 3µÄÊä³öÖØ¶¨Ïòµ½×Ô¶¨ÒåµÄÊä³öÄ¿±ê¡£
ºËÐÄ
PythonʹÓÃsys.stdout¡¢sys.stderr×öÊä³öÄ¿±ê£¬Ö»ÒªÎÒÃÇÌæ»»ÕâÁ½¸öÖµ¾Í¿ÉÒÔÖØ¶¨Ïòµ½ÎÒÃÇ×Ô¶¨ÒåÄ¿±ê¡£Ìæ»»µÄÖµµÄ¹æÔòÔÚPythonµÄÎĵµÖÐsys (module)µÄsys.stdoutÉÏÃæËµÃ÷Ö»ÒªÌí¼ÓÒ»¸öwriteº¯Êý¾Í¿ÉÒÔ ......