mod_gsoap error with C++ Service

607 views Asked by At

I need to build and deploy C++ web services using the mod_gsoap module and need some hints.

I followed the instructions at http://techiebitsandpieces.blogspot.de/2011/03/all-things-modgsoap.html and the sample "calc.c" Service is working fine. Then I tried the calc.cpp sample in the same way, but it's different and doesen`t work.
I get these Error:

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)

I think "failed to find the "apache_init_soap_interface" function entry point defined by IMPLEMENT_GSOAP_SERVER()" means, that my exchanged "main()-method" is wrong, it looks like these:

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

Any help would be appreciated

1

There are 1 answers

2
Rahul Agrawal On

This indicates that the calcserver.so was not generated properly. I would suggest not using apache's apxs tool to generate .so files for a c++ service.