PDA

View Full Version : Why am I getting multiple definition of with different namespaces?



rash.m2k
22nd September 2012, 17:54
A little bit of background first. I'm using the WSF C++ framework to generate C++ code from a WSDL file. For those that don't know this means sending/receiving XML message from a webservice is handle automatically and I don't need to touch XML at all.

I have generated C++ code for 2 different web services using their respective WSDL files - all good so far. However the names of some of the generated classes overlap between the two services and this is where my problems start.

Even though the definitions of my class are in DIFFERENT namespaces Qt linker still seems the think that I have defined them twice! See below for my generated code:

One random method I have been looking at is AbstractRequestType::resetMessageID(), I figure if I can fix this all the rest should be fixed as well.

WEB SERVICE A:

Header: http://pastebin.com/R95PYUDk
Source: http://pastebin.com/4swyccQg

WEB SERVICE B:

Header: http://pastebin.com/uFqHRZLE
Source: http://pastebin.com/4spyVDri

(apologies about the code format - it's just the way it has been generated by the tool)

EDIT::: And the log file ofcourse: http://pastebin.com/qLyWqTXV

I have edited the middle bits of the log file out because it was just similar errors but on different files.

You can see that Service A is in namespace eblbasecomponents_apis_ebay, and Service B is in ns_trading_service - so there should be no nameclash but there is!

Could someone please tell me how I can fix this?

wysota
26th September 2012, 09:09
Your project file is wrong. You can see that your log points out that many directives are being ignored by Make.