Web Services--gSOAP 2.7.6 第七章(7.2.2)

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

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

 

7.2.2 MSVC++ Builds

7.2.2 MSVC++ 编译

• Win32 builds need winsock.dll (MS Visual C++ wsock32.lib) To do this in Visual C++ 6.0, go to Projectsettings, select the Link” tab (the project file needs to be selected in the file view) and add wsock32.lib” to the Object/library modules” entry. 

Win32编译需要winsock.dll(MS Visual C++ wsock32.lib)要在Visual C++ 6.0做这个,选择“Project”,”settings”选择“Link”选项卡(这个project文件需要选择文件视图)和添加“wsock32.lib”到”Object/library modules”中。

• Use files with extension .cpp only (dont mix .c with .cpp).

使用文件的扩展名为.cpp(不要混合 .c在 .cpp)

• Turn pre-compiled headers off.

关闭预编译头文件。

• When creating a new project, you can specify a custom build step to automatically invoke the gSOAP compiler on a gSOAP header file. 

当创建一个新的project,你可以指定一个自定义编译步骤去自动调用这个gSOAP编译器在gSOAP头文件上。

In this way you can incrementally build a new service by adding new operations and data types to the header file. 

通过这种方式你可以逐渐地构建一个新的服务通过增加新的操作和数据类型到头文件中。

To specify a custom build step, select the Project” menu item Settings” and select the header file in the File view pane. 

去指定一个自定义生成步骤,选择”Project”菜单项目”Settings”,在File view pane中选择头文件。

Select the Custom Build” tab and enter soapcpp2.exe $(inputPath)”’ in the Command” pane. 

选择“自定义编译”选项卡并且在“命令”pane输入’soapcpp2.exe $(inputPath)”’。

Enter soapStub.h soapH.h soapC.cpp soapClient.cpp soapServer.cpp soapClientLib.cpp soapServerLib.cpp

进入’soapStub.h soapH.h soapC.cpp soapClient.cpp soapServer.cpp soapClientLib.cpp soapServerLib.cpp’。

Dont forget to add the soapXYZProxy.h soapXYZProxy.cpp soapXYZObject.h soapXYZObject.cpp files that are generated for C++ class proxies and server objects named XYZ. 

不要忘记添加C++类代理和名称为XYZ服务器对象生成的soapXYZProxy.h soapXYZProxy.cpp soapXYZObject.h soapXYZObject.cpp文件。

Click OK

点击“确定”。

Run the soapcpp2 compiler once to generate these files (you can simply do this by selecting your header file and select Compile). 

运行这个soapcpp2编译器一次生成这些文件(你可以简单的通过选择你的头文件和选择“编译”)

Add the files to your project. 

添加这些文件到你的工程。

Each time you make a change to the header file, the project sources are updated automatically.

每次你生成一个改变的头文件,这个项目源代码被自动的更新。

• You may want to use the WinInet interface available in the mod_gsoap directory of the gSOAP package to simplify Internet access and deal with encryption, proxies, and authentication.

你想要使用WinInet接口在mod_gsoap中可用的gSOAP包的目录去简单访问Internet和处理加密代理和身份验证。

API instructions are included in the source.

API操作指南已经在源代码中包含了。

• For the PocketPC, run the wsdl2h WSDL parser with option -s to prevent the generation of STL code. 

对于PocketPC,运行wsdl2h WSDL解析器使用选项-s去阻止STL代码的生成。

In addition, time_t serialization is not supported, which means that you should add the following line to typemap.dat indicating a mapping of xsd__dateTime to char*: xsd__dateTime = | char* | char*.

此外,不支持time_t序列化,这意味着一应该增加以下行到 typemap.dat指示一个xsd__dateTime映射到char*: xsd__dateTime = | char* | char*

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值