热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

在Linux/Unix上安装gSoap

这篇文章采用中英文混合了,不再对官网英文做翻译了,中间加入了我用中文写的自己补充的内容。MakesurethatyouhaveFlexandBison

这篇文章采用中英文混合了,不再对官网英文做翻译了,中间加入了我用中文写的自己补充的内容。

Make sure that you have Flex and Bison installed to build the soapccp2 tool:

sudo apt-get install flex bison

If you run into trouble installing Flex or Bison, then see the next section.
You may want to install OpenSSL to enable HTTPS for gSOAP clients and servers:

sudo apt-get install libssl-dev

接下来,想进行下面的操作,需要把下载的软件包解压到 home 文件夹,然后进入此文件夹。在我的机器上,我在 home 文件夹下执行

cd gsoap-2.8

这还不行,需要把文件 configure 属性设成可执行文件,不然的话后面的安装无法进行。命令如下:

sudo chmod 777 configure

接下来,按照官网介绍继续执行就行了。如此看来,官网的安装步骤说明,写的也是马马虎虎的,新手很难理解。

If you run into trouble installing OpenSSL, then see further below how to disable OpenSSL support in gSOAP.
Install the gSOAP software on Unix/Linux systems as follows:

下面的命令一句一句来,不要全部复制粘贴到 linux 命令终端窗口里去。另外,make 命令需要执行一小会,要耐心等待完成。软件包安装过程总起来还是很顺利的。

./configure
make
sudo make install

For the last step we use admin (root) permissions using sudo. To install the executables in a local folder, say in $HOME/bin without requiring root access, use:

./configure
make
sudo make install exec_prefix=$HOME

The ./configure command takes the following configuration options:

  • --enable-samples also builds the examples
  • --enable-ipv6 builds the library with IPv6 support (with compiler option -DWITH_IPV6)
  • --enable-ipv6-v6only builds the library with IPv6 support without remapping IPv4 to IPv6 (with compiler option -DWITH_IPV6_V6ONLY)
  • --disable-ssl removes all dependences on OpenSSL from the tools and libraries
  • --enable-gnutls replaces the dependence on OpenSSL by GNU TLS (with compiler option -DWITH_GNUTLS)
  • --enable-debug builds the software (with compiler option -DDEBUG) to produce audit logs (slow, not recommended for production)
  • --disable-namespaces removes global namespaces table linkage requirement (recommended for experts only)
  • --disable-c-locale removes the C locale and locale_t type that is internally used to override the local locale (the C locale is needed for proper use of decimal point in float values)
  • --enable-xlocale forces the inclusion of xlocale.h to define the locale_t type, which is useful if the build fails due to an undefined locale_t type
  • --with-openssl=DIR specifies the OpenSSL installation directory
  • --with-zlib=DIR specifies the Zlib installation directory
    After successful configuration and completion of the build steps, the following two tools are produced:
  • gsoap/bin/wsdl2h translator of WSDL/XSD to services and XML data bindings (interface tool)
  • gsoap/bin/soapcpp2 code generator for services and XML data bindings (implementation tool)
    The following libraries are produced depending on the configuration options:
  • gsoap/libgsoap++.a the C++ runtime engine (plain, no HTTPS)
  • gsoap/libgsoapssl++.a the C++ runtime engine with DOM support, COOKIEs, zlib, and SSL
  • gsoap/libgsoap.a the C runtime engine (plain, no HTTPS)
  • gsoap/libgsoapssl.a the C runtime engine with DOM support, COOKIEs, zlib, and SSL
    If you got these files, you are now ready to use gSOAP.
    If the above fails, then please verify that you have:
  • Automake tools installed (make and GNU m4)
  • Bison installed from www.gnu.org/software/bison or Yacc
  • Flex installed from GitHub
  • OpenSSL from www.openssl.org or GNUTLS from www.gnu.org/software/gnutls or you must disable SSL with ./configure --disable-ssl, see below
  • Optionally Zlib to support compression from www.zlib.net.
    To build the tools and libraries without SSL/TLS (i.e. removing HTTPS support and WS-Security support from wsdl2h and the libraries), rerun:

./configure --disable-ssl
make
sudo make install

For the last step use admin (root) permissions (e.g. using sudo) or use exec_prefix to install locally (see above).
To pass compile-time flags to make, such as -DWITH_NO_C_LOCALE:

make CFLAGS="-DWITH_NO_C_LOCALE" CXXFLAG="-DWITH_NO_C_LOCALE"

where CFLAGS applies to compiling C applications and CXXFLAGS applies to compiling C++ applications.
If you are having trouble with automake, Bison, or Flex then see the additional instructions below.

我检查了一下,发现可执行的命令文件安装到了目录 /usr/local/bin,其中有两个很关键的命令文件
gSoap开发包的下载地址http://sourceforge.net/projects/gsoap2,在bin目录下提供了两个工具:

1:wsdl2h:利用WSDL和XML schemas生成包含WS属性和操作的C++风格gSoap头文件。

2:soapcpp2:编译头文件并生成xml等文件。其中,soapH.h and soapC.cpp包含了数据类型的描述,soapClient.cpp给客户端使用,soapServer.cpp给服务端使用。

通过官方给出的介绍可知,wsdl2h用作wsdl和.h文件的转换。soapcpp2用头文件生成客户端/服务端等开发需要的h和cpp文件。下面是官方给出的一个例子:


参考:https://www.genivia.com/downloads.html#unix


推荐阅读
  • [精华]原来win+apache实现ssl的证书认证如此简单http:www.chinaunix.net作者:ataman发表于:2008-05-2218:16:46【 ... [详细]
  • 本文介绍了5个基本Linux命令行工具的现代化替代品,包括du、top和ncdu。这些替代品在功能上进行了改进,提高了可用性,并且适用于现代化系统。其中,ncdu是du的替代品,它提供了与du类似的结果,但在一个基于curses的交互式界面中,重点关注占用磁盘空间较多的目录。 ... [详细]
  • http:my.oschina.netleejun2005blog136820刚看到群里又有同学在说HTTP协议下的Get请求参数长度是有大小限制的,最大不能超过XX ... [详细]
  • 本文介绍了Web学习历程记录中关于Tomcat的基本概念和配置。首先解释了Web静态Web资源和动态Web资源的概念,以及C/S架构和B/S架构的区别。然后介绍了常见的Web服务器,包括Weblogic、WebSphere和Tomcat。接着详细讲解了Tomcat的虚拟主机、web应用和虚拟路径映射的概念和配置过程。最后简要介绍了http协议的作用。本文内容详实,适合初学者了解Tomcat的基础知识。 ... [详细]
  • 本文介绍了在Linux下安装和配置Kafka的方法,包括安装JDK、下载和解压Kafka、配置Kafka的参数,以及配置Kafka的日志目录、服务器IP和日志存放路径等。同时还提供了单机配置部署的方法和zookeeper地址和端口的配置。通过实操成功的案例,帮助读者快速完成Kafka的安装和配置。 ... [详细]
  • 本文介绍了如何清除Eclipse中SVN用户的设置。首先需要查看使用的SVN接口,然后根据接口类型找到相应的目录并删除相关文件。最后使用SVN更新或提交来应用更改。 ... [详细]
  • 31.项目部署
    目录1一些概念1.1项目部署1.2WSGI1.3uWSGI1.4Nginx2安装环境与迁移项目2.1项目内容2.2项目配置2.2.1DEBUG2.2.2STAT ... [详细]
  • 本文介绍了一个适用于PHP应用快速接入TRX和TRC20数字资产的开发包,该开发包支持使用自有Tron区块链节点的应用场景,也支持基于Tron官方公共API服务的轻量级部署场景。提供的功能包括生成地址、验证地址、查询余额、交易转账、查询最新区块和查询交易信息等。详细信息可参考tron-php的Github地址:https://github.com/Fenguoz/tron-php。 ... [详细]
  • 本文讨论了在VMWARE5.1的虚拟服务器Windows Server 2008R2上安装oracle 10g客户端时出现的问题,并提供了解决方法。错误日志显示了异常访问违例,通过分析日志中的问题帧,找到了解决问题的线索。文章详细介绍了解决方法,帮助读者顺利安装oracle 10g客户端。 ... [详细]
  • centos安装Mysql的方法及步骤详解
    本文介绍了centos安装Mysql的两种方式:rpm方式和绿色方式安装,详细介绍了安装所需的软件包以及安装过程中的注意事项,包括检查是否安装成功的方法。通过本文,读者可以了解到在centos系统上如何正确安装Mysql。 ... [详细]
  • Hadoop 源码学习笔记(4)Hdfs 数据读写流程分析
    Hdfs的数据模型在对读写流程进行分析之前,我们需要先对Hdfs的数据模型有一个简单的认知。数据模型如上图所示,在NameNode中有一个唯一的FSDirectory类负责维护文件 ... [详细]
  • 基于SSL的mysql服务器的主从架构实现说明:本文选用172.16.22.1作为主服务器,172.16.22.3作为从服务器从服务器的mysql软件版 ... [详细]
  • 1.WebServicea.定义:WebService是一种跨编程语言和跨操作系统平台的远程调用技术b.三大技术:XMLXSD,SOAP, ... [详细]
  • 删除iPad或iPhone目录privatevarkeychainskeychain-2.db文件,重启iPad或iPhone。1.如何卸载机内自带软件? ... [详细]
  • 本文是搭建的mariadb-10.0.17版本的下载地址:https:downloads.mariadb.orginterstitialmariadb-10.0.17sourcemariadb-10.0.17.tar.gzfromhtt ... [详细]
author-avatar
手机用户2502872401
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有