Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Missing client object definition from kdsoap example
Forum Updated to NodeBB v4.3 + New Features

Missing client object definition from kdsoap example

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 3.5k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    ash_microsec
    wrote on last edited by
    #1

    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:

    @<C#WCFServiceContract>
    namespace ServicePOC
    {
    [ServiceContract]
    public interface IMyServicePOC
    {
    [OperationContract]
    bool MyMethod(string svalue);
    }
    }
    </C#WCFServiceContract>@

    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):

    @<KdsoapExample>
    USHolidayDates client;
    TNS__GetValentinesDay request;
    resquest.setYear( 2010 );
    TNS__GetValentinesDayResponse response = client.getValentinesDay( request );
    const QDateTime valentinesDay = response.getValentinesDayResult();
    </KdsoapExample>@

    @<MyQtExample>
    // get the entered value
    QString value = ui.m_ledValue->text();

    // create the request object
    TNS__MyMethod request;
    request.setValue(value);

    // TODO: I appear to be missing the object definition required to instantiate the client?!
    ??????? client;
    TNS__MyMethodResponse response = client.MyMethod(request);

    // check the response
    bool bis_value_correct = response.MyMethodResult();
    </MyQtExample>@

    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).

    Thanks

    1 Reply Last reply
    0
    • D Offline
      D Offline
      dfaure
      wrote on last edited by
      #2

      Can you send me the corresponding .wsdl file?

      David Faure (david.faure@kdab.com)
      KDE/Qt Senior Software Engineer
      KDAB - Qt Experts - Platform-independent software solutions

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved