
web service
文章平均质量分 53
许野平
非常喜欢软件设计这份工作,有不错的数学基础,喜欢读书、摄影与音乐。
展开
-
Rust:一个简单的 Web 应用程序示例
源代码 编写 Web 应用程序,输入两个自然数,输出其最大公约数。 Cargo.toml 文件 [package] name = "testweb" version = "0.1.0" edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] iron = "0.5.1" mime = "0.2.3" ro原创 2021-10-18 17:05:01 · 1306 阅读 · 0 评论 -
用 C++ 实现一个独立的 Web Service 程序
0. 序 这一次我创建一个名为 calc 的 Web Service 程序,功能很简单,实现一个整数 add 函数。 1. 创建源代码 我创建了一个 calc 目录,里面创建下面两个文件: calc.h: int ns__add(int x, int y, int &result); 很奇葩的是,函数 add 之前必须加上 ns__,否则后续工作无法继续。看官网的例子,加上 ns2__ 前缀也行。具体什么原因有知道的可以留言补充一下。 calc.cpp #include "ns.nsmap" #i原创 2021-05-29 18:47:10 · 588 阅读 · 1 评论 -
Hello, gSoap: 用 gSoap 创建自己的第一个 Web Services 程序。
目录1. 准备项目文件夹。2. 创建源代码3. 生成 Web Services 源代码4. 编译项目5. 部署 1. 准备项目文件夹。 先创建一个文件夹保存我们这个项目的文件。 把 stdsoap2.cpp 文件从 gSoap 的文件夹里复制到当前文件夹,等一会编译项目的时候要用。其实可以用更优雅的方法,比如设置搜索路径等。本文中,我就粗暴处理了,直接复制过来,当然这样也无伤大雅, 2. 创建源代码 头文件 hello.h: int ns__hello(std::string name, std::stri原创 2021-05-29 17:12:04 · 257 阅读 · 0 评论