gsoap 的用法
1. 首先编辑.h文件,模版如下:
注意:
service port
这里是我们webservice的地址。
#import "stlvector.h"
//gsoap ns1 service name: sysinfoSOAP
//gsoap ns1 service type: sysinfo
//gsoap ns1 service port: http://127.0.0.1:10008
//gsoap ns1 service namespace: http://www.example.org/sysinfo/
//gsoap ns1 service transport: http://schemas.xmlsoap.org/soap/http
//gsoap ns1 service method-style: fetch_USCOREcpu rpc
//gsoap ns1 service method-encoding: fetch_USCOREcpu http://schemas.xmlsoap.org/soap/encoding/
//gsoap ns1 service method-action: fetch_USCOREcpu http://www.example.org/sysinfo/fetch_cpu
int ns1__fetch_USCOREcpu(
std::string &result ///< Response parameter
);
//gsoap ns1 service method-style: fetch_USCOREmemory rpc
//gsoap ns1 service method-encoding: fetch_USCOREmemory http://schemas.xmlsoap.