Web Services--gSOAP 2.7.6 第一章(1.1)

150 篇文章 0 订阅
19 篇文章 0 订阅

下载地址:http://sourceforge.net/projects/gsoap2

官方网站:http://genivia.com/Products/gsoap/index.html

本文翻译只是出于学习的目的,中文部分仅代表个人观点,有错误还望指正,英文部分来自gsoap-win32-2.7\doc\soapdoc2.pdf。其中复制可能有误,可以看懂英文的还请到官网下载。如有版权争议,请联系QQ:643166601,本人会及处理。翻译新手,有错是必然的,求高人指点。欢迎同为新手的你共同学习。

1 Introduction

1简介

The gSOAP tools provide a SOAP/XML-to-C/C++ language binding to ease the development of SOAP/XML Web services and client application in C and C++. 

这个gSOAP工具提供了一个SOAP/XML--C/C++语言的绑定,SOAP/XML Web services的开发变得容易,客户端应用用C/C++

Most toolkits for C++ Web services adopt a SOAP-centric view and offer APIs that require the use of class libraries for SOAPspecific data structures. 

大多数开发包为了C++ Web services 采取了一个 SOAP-centric view和提供APIs及需要用SOAPspecific数据结构的类库。

This often forces a user to adapt the application logic to these libraries. 

这常常迫使一个用户适应这个应用程序的逻辑去使用这些库。

In contrast, gSOAP provides a C/C++ transparent SOAP API through the use of compiler technology that hides irrelevant SOAP-specific details from the user. 

于此相反,gSOAP提供一个 C/C++ 透明的 SOAP API 通过这个使用的编译技术,向用户隐藏不相干的SOAP-specific细节。

The gSOAP stub and skeleton compiler automatically maps native and user-defined C and C++ data types to semantically equivalent XML data types and vice-versa. 

这个gSOAP stub 和 skeleton 编译,自动映射本地和用户定义的C/C数据类型到语义相等的XML的数据类型,反之亦然。

As a result, full SOAP interoperability is achieved with a simple API relieving the user from the burden of SOAP details, thus enabling him or her to concentrate on the application-essential logic.

结果,全部的SOAP协同工作的能力,实现一个简单的API帮助用户从繁重的SOAP细节。因此迷惑他或她专心在应用程序的基本的逻辑。

 

The gSOAP compiler enables the integration of (legacy) C/C++ and Fortran codes (through a

Fortran to C interface), embedded systems, and real-time software in SOAP applications that share computational resources and information with other SOAP applications, possibly across different platforms, language environments, and disparate organizations located behind firewalls.

这个gSOAP编译程序使他能够结合的(旧版的)C/C++Fortran代码(通过FortranC的接口),嵌入式系统,和实时软件在SOAP应用中共享计算的资源和信息和其它的SOAP应用,可能跨越不同的平台,语言环境,和完全不同的组织位于防火墙的后面。

 

1.1 Getting Started

1.1 入门

To start building Web services applications with gSOAP, you need:

去开始用gSOAP建立Web services程序,你需要: 

• The gSOAP package from http://sourceforge.net/projects/gsoap2

(下载)这个gSOAP包来自 http://sourceforge.net/projects/gsoap2

• A C or C++ compiler.

一个CC++编译器。

• You may want to install OpenSSL and the Zlib libraries to enable SSL (HTTPS) and compression.

你将要去安装OpenSSLZlib 库使能够用 SSL(HTTPS) 和压缩。

These libraries are available for most platforms and are often already installed.

这些库是在大多数平台是可用的和经常已经被安装的。

gSOAP is self-contained, so there is no need to download any third-party software (unless you want to use OpenSSL and the library is not already installed).

gSOAP是自包含的,因此不需要任何第三方软件(除非你想要去使用OpenSSL和库是没有被安装过的)

 

Although gSOAP is available in binary format for several platforms, the code generated by the gSOAP stub and skeleton compiler and the gSOAP runtime codes are equivalent. 

尽管gSOAP是可用的以二进制格式在一些平台,这些代码被生成通过gSOAP stubskeleton编译器和gSOAP运行时代码是相同的。

This means that the generated codes can be transferred to other platforms and compiled.

这意味着这写被生成的代码可以移植到其它平台和被编译。

The gSOAP packages available from SourceForge include pre-build tools:

这个gSOAP包可用来自SourceForge包含预构建的工具:

• The wsdl2h WSDL/schema parser tool.

这个wsdl2h WSDL/schema 分析工具。 

• The soapcpp2 stub/skeleton compiler.

这个 soapcpp2 stub/skeleton 编译器。

Win32 versions of these two are included in the Win32 gSOAP package only. 

Win32版本中这两个是只在Win32 gSOAP包中被包含。

If you dont have the binaries or if you want to rebuild them, you need

如果你不想要这个库或这你想要去重新构建他们,你需要

• A C++ compiler to build wsdl2h.

一个C++编译器去构建wsdl2h

• A C compiler and Bison or Yacc to build soapcpp2.

一个C编译器和BisonYacc去构建soapcpp2.

• A C compiler and Flex or Lex to build soapcpp2.

一个C编译器和Flex 或 Lex去构建soapcpp2.

Bison and Flex are preferred.

Bison 和 Flex是首选。

The tools are used to generate code that is linked with the gSOAP engine soapcpp2.c (C version) or soapcpp2.cpp (C++ version) and your application code. 

这些工具是被用来生成代码,是用来被连接这个gSOAP引擎soapcpp2.c (C 版本)soapcpp2.cpp (C++ 版本)和你的应用代码。

The engine is also available as a library libgsoap.a and libgsoap++.a with separate versions that support SSL. 

这个引擎是也可能作为一个库libgsoap.a 和 libgsoap++.a和分开的版本支持SLL

See the README.txt instructions on how to build these libraries with the platform-independent gSOAP packages autoconf and automake.

README.txt操作指南,怎样去构建这些库和平台独立的gSOAP包的autoconf 和 automake文件。

 

The gSOAP packages contain numerous examples in the samples directory.

这个gSOAP包包含很多的例子在这个样品目录。

Run make to build the example applications.

运行产生生成构建这些例子程序。 

The examples are also meant to demonstrate different features of gSOAP.

这些例子是也意味着去证明gSOAP的不同的特征。

The simplest examples are the one-liners in samples/oneliners. 

这个最简单的例子是一个例子中仅有一行。

Indeed, you can write a one-line Web service with CGI!. 

的确,你能写一个一行的Web serviceCGI!

A streaming DIME attachment server and client application demonstrate efficient file exchanges in samples/dime. 

一个流DIME附件服务器和客户端程序证明有效率的文件交换在一个例子/DIME

 

An SSL-secure Web server application demonstrates the generation of dynamic content for Web browsing and Web services functionality at the same time, see samples/webservice. 

一个SSL-安全的 Web服务器程序证明Web浏览器和Web服务功能的这个动态产生的内容在相同的时间,看例子/webservice

And much more.

等等。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值