【急】soap 类 如何 定义
开始学webserver 遇到个问题,想请教大侠
主函数如下
int main(void)
{
printf("very good!/n");
_ns1__getWeatherbyCityName city; //这样的对象将生成怎样的对象啊?
_ns1__getWeatherbyCityNameResponse cityResponse;
WeatherWebServiceSoapProxy service;
if(service.getWeatherbyCityName(city,cityResponse) == SOAP_OK)
{
//如何返回天气的值
}
return 0;
}
class SOAP_CMAC _ns1__getWeatherbyCityName
{
public:
std::string *theCityName;/* optional element of type xsd:string */
struct soap *soap;/* transient */
public:
virtual int soap_type() const { return 16; } /* = unique id SOAP_TYPE__ns1__getWeatherbyCityName */
virtual void soap_default(struct soap*);
virtual void soap_serialize(struct soap*) const;
virtual int soap_put(struct soap*, const char*, const char*) const;
virtual int soap_out(struct soap*, const char*, int, const char*) const;
virtual void *soap_get(struct soap*, const char*, const char*);
virtual void *soap_in(struct soap*, const char*, const char*);
_ns1__getWeatherbyCityName() { _ns1__getWeatherbyCityName::soap_default(NULL); }
virtual ~_ns1__getWeatherbyCityName() { }
};
class SOAP_CMAC _ns1__getWeatherbyCityNameResponse
{
public:
ns1__ArrayOfString *getWeatherbyCityNameResult;/* SOAP 1.2 RPC return element (when namespace qualified) *//* optional element of type ns1:ArrayOfString */
struct soap *soap;/* transient */
public:
virtual int soap_type() const { return 17; } /* = unique id SOAP_TYPE__ns1__getWeatherbyCityNameResponse */
virtual void soap_default(struct soap*);
virtual void soap_serialize(struct soap*) const;
virtual int soap_put(struct soap*, const char*, const char*) const;
virtual int soap_out(struct soap*, const char*, int, const char*) const;
virtual void *soap_get(struct soap*, const char*, const char*);
virtual void *soap_in(struct soap*, const char*, const char*);
_ns1__getWeatherbyCityNameResponse() { _ns1__getWeatherbyCityNameResponse::soap_default(NULL); }
virtual ~_ns1__getWeatherbyCityNameResponse() { }
};
virtualint getWeatherbyCityName(_ns1__getWeatherbyCityName *ns1__getWeatherbyCityName, _ns1__getWeatherbyCityNameResponse *ns1__getWeatherbyCityNameResponse) { return this->getWeatherbyCityName(NULL, NULL, ns1__getWeatherbyCityName, ns1__getWeatherbyCityNameResponse); }
virtualint getWeatherbyCityName(const char *endpoint, const char *soap_action, _ns1__getWeatherbyCityName *ns1__getWeatherbyCityName, _ns1__getWeatherbyCityNameResponse *ns1__getWeatherbyCityNameResponse);
soap
[解决办法]
菜单 项目-添加web引用。
[解决办法]
随便搜了一个文章:http://blog.csdn.net/begtostudy/article/details/2605017