undefined reference to namespaces - gsoap error

marryy picture marryy · Jun 1, 2011 · Viewed 9.1k times · Source

I am working in ubuntu, c++ code.

Using gsoap and wsdl2h -o header.h http://link1 http://link2 I've successfully succeeded to create .h, .cpp and .xml files. When I #include proxy1.h and #include proxy2.h and their nmsp files I receive the following error:

redefinition of "Namespace namespaces[]', previously defines here . 

How to solve this error? When I use: stdsoap2 -i -C -Iimport header.h can't I specify a different namespace for each url? I would like to mention that stdsoap.cpp is used when I compile the code. In stdsoap the namespace is called namespaces.

thx

Answer

j4x picture j4x · Jun 14, 2011

You must define WITH_NONAMESPACES when importing multiple webservices in a single client.

See How to Create Client/Server Libraries and soapcpp2 Options.