Hi,
I'm trying to write a SOAP service using Axis2/C framework. I need the
service to be written in a C++ language, so as a first step I took an
'echo service' example from the Axis distribution, renamed it to .cpp
file and compiled/linked it with 'g++' compiler. No compile errors
reported, the resulting .so library I copied to the services
directory, together with the corresponding services.xml file.
I compiled a sample client that tries to send something to my new service.
Than I strarted an 'axis2_http_server' application and run the client,
which failed with a SOAP error message about failure to load a dll.
I found in the Axis2/C source code the place where it loads the .so
file (axutil_class_loader_load_lib() in file 'class_loader.c'), and
added debug log message that reports into the log the exact text of an
error as it is returned by dlerror() function, not just a message that
if failed to load a library, like this (after line 156 of the file
'class_loader.c'):
if (!dl_handler)
{
AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
"AXIS2_PLATFORM_LOADLIB error: [%s]",
AXIS2_PLATFORM_LOADLIB_ERROR);
...
...
...
after recompiling the Axis and running the test again, I see in the
log following message:
class_loader.c(159) AXIS2_PLATFORM_LOADLIB error:
[/home/alexb/wsfcpp-repo/services/my_service/libmy_service.so:
undefined symbol: __gxx_personality_v0]
I understand that the real problem is that the axis2_http_server
application is not compiled/linked with the g++ support libraries.
Several years ago I had similar problem when writing a C++ module for
Apache's httpd server, but there the solution was to use an httpd's
directive 'LoadFile' to load the g++ runtime library into the httpd
environment before loading my C++ module with the LoadModule
directive.
So the question is, does anyone knows how to make the
axis2_http_server to load the g++ runtime library before it loads a
C++ .so service library?
For the record, I'm doing all this on the Ubuntu 7.10, and here is a
result of running 'g++ --version:
$ g++ --version
g++ (GCC) 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]