Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

undefined reference to namespaces - gsoap error

Tags:

c++

ubuntu

gsoap

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

like image 690
marryy Avatar asked Jun 01 '11 07:06

marryy


1 Answers

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

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

like image 164
j4x Avatar answered Oct 13 '22 20:10

j4x