Recently I have got a small C++ SOAP client project (ubuntu linux) to build using gSOAP. I am using 2 web service classes which I believe I have created correctly according to the documentation. However, I am having problems with my code
#include "envH.h"
#include "betfairBFGlobalServiceProxy.h"
#include "betfairBFExchangeServiceProxy.h"
//#include "betfair.nsmap"
#include <iostream>
#include <string>
// Following included to prevent ligsoap++ complaining of undefined references
// to 'namespaces'
SOAP_NMAC struct Namespace namespaces[] = {};
using namespace std;
using namespace betfair;
int main()
{
BFGlobalServiceProxy bf;
BFExchangeServiceProxy betfair2; /* CRASH!! */
return 0;
}
I want to make API calls to both web services but my program crashes at the point where the second service proxy object is created. I have used wsdl2h -gbetfair option and soapcpp2 -i -n options and created a new env.h file as requested in the documentation when creating multiple client services using C++ namespaces to avoid linker errors when linking to libgsoap++ . Can anyone see what I am doing wrong???