[ http://issues.apache.org/jira/browse/AXISCPP-533?page=comments#action_12372059 ]
Emanuel Norrbin commented on AXISCPP-533: ----------------------------------------- I found another interesting problem related to this. I have two wsdl:s that generate server C++ stubs with classes that have the same C++ names but different interfaces/implementations. Since these web services are compiled into separate .so libraries there is no problem with this at compile time. For separate reasons we need to load libraries using the RTLD_GLOBAL flag (using g++ on Linux) as mentioned in the original post. Just like Tim we really need this flag when libraries are loaded by the axis_server for our product to work. Now for the gotcha: With this flag set, any of the two classes having the same names can be loaded by axis when serializing/deserializing a soap message. This will ofcourse not work if the wrong class is picked. We have worked around this problem by putting one of the generated classes in a separate namespace with corresponding changes to the implementation. An alternative is to never use the same class name, but this is hard to enforce and wsdl2ws itself produces classes with the same names, e.g. AxisServiceException which is always generated. I dont know if this could solve the problems found by Adrian (see comment above) but it would be easy to fix in wsdl2ws for C++: 1. Generate a unique namespace for each web service. A GUID would work. 2. Let each Axis generated class belong to this namespace. 3. Put a "using namespace XXX" in the beginning of each *.cpp file (after the #includes section). Please give your comments to this. /Emanuel > Inter shared library exception handling broken on Linux > ------------------------------------------------------- > > Key: AXISCPP-533 > URL: http://issues.apache.org/jira/browse/AXISCPP-533 > Project: Axis-C++ > Type: Bug > Components: Basic Architecture > Versions: current (nightly) > Environment: GNU specific (as far as I know) > Reporter: Tim Bartley > Assignee: Mark Whitlock > > On Linux, actually on systems where the compiler and common libraries are g++ > and gnu and glibc, exception handling between shared libraries is broken. It > is broken because the same class in different shared libraries is treated > differently so that an HTTPTransportException thrown by a channel library > does not match "catch (HTTPTransportException& e)" in the transport library. > Refer to http://gcc.gnu.org/faq.html#dso for details. > The fix is to load the subordinate library with RTLD_GLOBAL flag. > As far as I know this is GNU specific but may apply to other platforms. > It's possible that others are not seeing this because the context in which I > am running Axis is from within an application that itself dynamically loads a > library that depends on Axis. > Cheers, > Tim -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
