gsoap下用session的问题。。。

清雨小竹 2011-10-07 10:34:17
服务端http://125.46.50.200/enatt/coreservices.asmx,想用gsoap实现session。。。。。没办法。。。。
...全文
210 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
清雨小竹 2012-02-28
  • 打赏
  • 举报
回复
嗯,谢谢,可以了
masterz 2011-11-18
  • 打赏
  • 举报
回复
19.28 Client-Side Cookie Support

Client-side cookie support is optional. To enable cookie support, compile all sources with option -DWITH_COOKIES, for example:

> c++ -DWITH_COOKIES -o myclient stdsoap2.cpp soapC.cpp soapClient.cpp

or add the following line to stdsoap.h:

#define WITH_COOKIES

Client-side cookie support is fully automatic. So just (re)compile stdsoap2.cpp with -DWITH_COOKIES to enable cookie-based session control in your client.
A database of cookies is kept and returned to the appropriate servers. Cookies are not automatically saved to a file by a client. An example cookie file manager is included as an extras in the distribution. You should explicitly remove all cookies before terminating a gSOAP context by calling soap_free_cookies(soap) or by calling soap_done(soap).
To avoid "cookie storms" caused by malicious servers that return an unreasonable amount of cookies, gSOAP clients/servers are restricted to a database size that the user can limit (32 cookies by default), for example:

struct soap soap;
soap_init(&soap);
soap.cookie_max = 10;

12,162

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 Web Services
社区管理员
  • Web Services社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧