PDA

View Full Version : QtSoap: Changing the type of a webservice object



simon.hain
26th April 2013, 08:48
I want to add a methodargument with a different type to my request.

My current code adds the version (int) as a string, it's working unless the server is strict with its wsdl:

request.addMethodArgument("VersionIm", "", version);

The desired type for this is Short, which is not available as a simple type.
I am trying to call it like this, but it is not working:

QtSoapType* versionTag = new QtSoapType(QtSoapQName("VersionIm", version), QtSoapType::Short);
request.addMethodArgument(versionTag);

Any hints what I am doing wrong?