c++ - C++ 服务的 mod_gsoap 错误

标签 c++ apache gsoap

我需要使用 mod_gsoap 模块构建和部署 C++ Web 服务,并且需要一些提示。

我按照 http://techiebitsandpieces.blogspot.de/2011/03/all-things-modgsoap.html 中的说明进行操作示例“calc.c”服务工作正常。然后我以同样的方式尝试了 calc.cpp 示例,但它不同并且不起作用。
我收到这些错误:

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()-method”是错误的,它看起来像这样:

> #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; }

任何帮助将不胜感激

最佳答案

这表明 calcserver.so 没有正确生成。我建议不要使用 apache 的 apxs 工具为 c++ 服务生成 .so 文件。

关于c++ - C++ 服务的 mod_gsoap 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27060910/

相关文章:

php - 表单 POST 数据正在转换我的输入

c - gsoap 客户端编译/链接错误

c++ - 简单的 C++ 运算符重载帮助

c++ - 模板上的宏

php - 自定义页面错误 500 错误

java - 我可以将 Apache Tomcat 7 与 servlet api 2.5 一起使用吗

没有井号的 C++ 宏定义

c++ - g++ (mingw) 表示 to_string 不是 std 的成员

c++ - soapcpp2 版本 2.8.1 丢失的文件

c++ - gSOAP 在请求完成后删除对象中的引用值