我需要使用mod_gsoap模块构建和部署C ++ Web服务,并需要一些提示。
我按照http://techiebitsandpieces.blogspot.de/2011/03/all-things-modgsoap.html上的说明操作,示例“calc.c”服务正常运行。然后我以同样的方式尝试了calc.cpp样本,但它有所不同,并且doesen`t工作 我得到这些错误:
mod_gsoap Apache SOAP Server Error
gsoap: httpd.conf module mod_gsoap.c SOAPLibrary load "/app/home/coruser/schmidt/gsoap-2.8.14/gsoap-2.8/gsoap/samples/calc++/.libs/calcserver.so" success, but failed to find the "apache_init_soap_interface" function entry point defined by IMPLEMENT_GSOAP_SERVER()
Please see the README instructions with the mod_gsoap package for details.
Content headers of the request
Accept-Encoding: gzip,deflate
Content-Type: text/xml;charset=UTF-8
SOAPAction: ""
Content-Length: 453
Host: lxcor03e:6127
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)
我认为“未能找到由IMPLEMENT_GSOAP_SERVER()定义的”apache_init_soap_interface“函数入口点”意味着,我交换的“main() - 方法”是错误的,它看起来像这样:
> #include "apache_gsoap.h"
>
> IMPLEMENT_GSOAP_SERVER()
>
> extern "C" int soap_serve(struct soap *soap)
> { calcService service(soap);
> int err = service.serve();
> service.destroy();
> return err; }
任何帮助将不胜感激
答案 0 :(得分:1)
这表示calcserver.so未正确生成。我建议不要使用apache的apxs工具为c ++服务生成.so文件。