Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Missing client object definition from kdsoap example
ash_microsec last edited by
This is Qt related, but actually to do with the KDAB kdsoap library which provides a SOAP mechanism using Qt. There is little kdsoap resources online, so I'm posting here in case someone else in the Qt Development world has come across this problem.
I am putting together a small Qt (4.7.4 shared) application that demonstrates using KDSoap (1.1.0 opensource) to provide a SOAP connection to a C# WCF service (all built using MSVS 2010).
The WCF service has a simple service contract:
public interface IMyServicePOC
bool MyMethod(string svalue);
Using MSVS 2010's WCF Test Client, the WCF service endpoints have been tested using IE and shown to work. The WCF service's wsdl has been retrieved from the service when it is running, and then saved. I ran the kdwsdl2cpp tool to generate the .h and .cpp files for compilation into my Qt application. Once I resolved the missing kdsoap inclusions from the generated files (!), these files were compiled and linked into the application successfully.
I have added a push button to my Qt application's GUI and attempted to use the example from the kdsoap opensource manual's "Using WSDL to Generate Client API" (page 12):
resquest.setYear( 2010 );
TNS__GetValentinesDayResponse response = client.getValentinesDay( request );
const QDateTime valentinesDay = response.getValentinesDayResult();
// get the entered value
QString value = ui.m_ledValue->text();
// create the request object
// TODO: I appear to be missing the object definition required to instantiate the client?!
TNS__MyMethodResponse response = client.MyMethod(request);
// check the response
bool bis_value_correct = response.MyMethodResult();
The problem appears to be that the generated header file does not contain anything similar to the example "USHolidayDates" client, so I have no class that can be instantiated to call "???? client; client.myMethod(request);" - the generated header file only contains "TNS__MyMethod" and "TNS__MyMethodResponse" classes.
What am I missing?
The opensource documentation provided by kdsoap is limited (to say the least) and I haven't found a publicly accessible kdsoap specific forum. (I sent KDAB a support request yesterday with this information in, but no reply yet).
dfaure last edited by
Can you send me the corresponding .wsdl file?