Huaqing Vision Lecturer
Simple Object access Protocol (SOAP) is a protocol specification for exchanging data, a lightweight, simple protocol that is based on XML (a subset of standard generic markup languages). It is designed to exchange structured and solidified information on the web.
This article describes the use of SOAP embedded Linux.
First, gSOAP
Reasons to choose gSOAP:
The gSOAP compilation tool provides a soap/xml implementation of the C + + language, making it much easier to develop a Web service or client program in the C/D + + language. The vast majority of the C++web Service Toolkit provides a set of API function class libraries to handle specific SOAP data structures, which makes it necessary for users to change the program structure to fit the relevant class library. In contrast, gSOAP uses compiler technology to provide a transparent set of soap APIs and hides content related to the development-agnostic SOAP implementation details to the user.
Portability: gSOAP supports most platforms, including embedded systems and small systems (such as embedded Symbian,palm). Portability test for Windows (98,xp,vista), Linux,unix system, Mac OS X,solaris,hp-ux,aix,freebsd,tru64,irix,qnx,vxworks.
Second, the transplant of gSOAP
1. Download the source code
http://sourceforge.net/projects/gsoap2/files/
Http://jaist.dl.sourceforge.net/project/gsoap2/gSOAP/gsoap_2.8.24r.zip
The download version for this example is: Gsoap_2.8.24r.zip
2. Extracting source code
$ unzip Gsoap_2.8.24r.zip
3. Compiling tools under x86 platform
Configure the source code
$./configure--prefix=/home/linux/gsoap/gsopa-x86
Configure some features, such as the target platform installation path, such as the configuration target platform is the x86 architecture, the installation path is/home/linux/gsoap/gsoap-x86
Compiling source code
$ make
Install Source to/home/linux/gsoap/gsoap-x86 directory
$ make Install
4. Compiling ARM Platform Tools
./configure--prefix=/home/linux/gsoap/gsopa-arm--host=arm-linux
Configure the source again, this time the target platform becomes Arm-linux
Modify the source code, according to the compilation error prompts to make the appropriate changes:
Modify the Config.h under the source directory
Comment out:
#define MALLOC Rpl_malloc
Soapcpp and WSDL2H generate co-workers during compilation The two tools are also used to generate some specific files at compile time, so if Soapcpp and wsdl2h are compiled into an arm architecture, they cannot be executed on the PC, which means that the resulting compilation cannot be completed. So here we choose not to compile these two files, and choose to use the corresponding files of the x86 schema produced by the previous section.
Modify Gsoap/src/makefile
Comment out
soapcpp2$ (Exeext): $ (soapcpp2_objects) $ (soapcpp2_dependencies) $ (extra_soapcpp2_dependencies)
@rm-F soapcpp2$ (Exeext)
$ (AM_V_CCLD) $ (soapcpp2_link) $ (soapcpp2_objects) $ (soapcpp2_ldadd) $ (LIBS)
Modify Gsoap/wsdl/makefile
wsdl2h$ (Exeext): $ (wsdl2h_objects) $ (wsdl2h_dependencies) $ (extra_wsdl2h_dependencies)
@rm-F wsdl2h$ (Exeext)
$ (AM_V_CXXLD) $ (wsdl2h_link) $ (wsdl2h_objects) $ (wsdl2h_ldadd) $ (LIBS)
Copy the Soapcpp and wsdl2h under the x86 schema to the project source directory:
$ cp/home/linux/gsoap/gsoap-x86/bin/soapcpp2/home/linux/gsoap/gsoap-2.8/gsoap/src/
$ cp/home/linux/gsoap/gsoap-x86/bin/wsdl2h/home/linux/gsoap/gsoap-2.8/gsoap/wsdl/
Compile
$ make
Installation
Make install
>>> more Excellent technology blog source Embedded College
This article is from the "Embedded Learning World" blog, please be sure to keep this source http://farsight.blog.51cto.com/1821374/1748364
Application of Soap embedded Linux (i)