Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7817259
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T06:10:27+00:00 2026-06-02T06:10:27+00:00

I am writing a C++ web service client using gSOAP on linux using 2

  • 0

I am writing a C++ web service client using gSOAP on linux using 2 separate wsdl files in the same application. I have managed to get things working with just one wsdl file, and after reading documentation, went through the process of using wsdl2h on both files:

    wsdl2h -o header.h wsdlfile1.wsdl wsdlfile2.wsdl

This worked fine and so I then did

    soapcpp2 -i -I/usr/share/gsoap/import/ header.h

I then did all the usual namespace modifications in the typemap.dat as instructed. I now find that I have two .cpp and .h files of the type soapService1Proxy.cpp/h and soapService2Proxy.cpp/h. This is not quite what I expected, but regardless, I included both headers in my main function and created instances of each Proxy class and used in exactly the same way as I did for with just one wsdl file. I then compile with

    g++ -DWITH_OPENSSL main.cpp soapC.cpp soapService1Proxy.cpp soapService2Proxy.cpp -lgsoapssl++ -lssl

which returns the error

    /tmp/ccHNDAM4.o:(.data+0x0): multiple definition of `namespaces'
    /tmp/ccLJIHwV.o:(.data+0x0): first defined here
    collect2: ld returned 1 exit status

I know that the ‘namepaces’ refers to the array in the .nsmap files (which in this case are identical for each wsdl). I have included only one of these as the compiler complains of multiple definition if I include both. I really would appreciate it if anyone could tell me what I am doing wrong here as I have tried to follow the guidelines and gSOAP docs as faithfully as possible but simply cannot resolve this problem.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T06:10:29+00:00Added an answer on June 2, 2026 at 6:10 am

    I’ve never used SOAP but I had a quick look at this user guide.

    The last paragraph in section 7.1.4 says that the -n and -p options to soapcpp2 help to resolve link conflicts. The link there to section 19.35 provides more information. It appears you have to run wsdl2h on each file separately using the -q option to provide a C++ namespace for each one. When you then run soapcpp2 it will automatically apply -p and all you have to do is supply -n to have the namespaces array prefixed with your C++ namespace name followed by an underscore.

    I haven’t tried any of this but hopefully that will be enough to
    get you going again.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is my first time writing a web service client, it's funny, I have
I am writing a C# client that calls a web service written in Java
So I'm writing a Ruby client for a SOAP web service, and I've figured
I'm writing a smallish web service in Ruby using Sinatra. Access to pretty much
I'm writing a JAXWS-RI client that must call a .NET Web Service that is
I'm writing my first C# web application that connects to an XML based service.
I'm writing UI to test an asmx web service. Server and client are .NET.
I'm writing a web application using python JSON-RPC implementation - http://json-rpc.org/wiki/python-json-rpc on server side
I'm writing a web-service for Android. The client side will be coded in JAVA
I'm writing my own ContentProvider which will be synced to a web service using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.