Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
simon_hain
Posts: 16,190
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
Accepted Solution

QtSoap: Changing the type of a webservice object.

I want to add a tag with the type short, but seem not to be able to get it right.

 

What i am currently doing (just adding it as a string).

request is a QtSoapMessage

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

 What i am trying:

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

This does not result in anything being added to the request though, toXmlString does not print it.

 

Any ideas?

----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.
Developer
simon_hain
Posts: 16,190
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: QtSoap: Changing the type of a webservice object.

i have finally solved this, as i got no replies here or on any other qt-related forums i decided to check the source of the qtsoap library itself.

i was able to add the short type by adding an additional constructor to QtSimpleType:

qtsoap.h

QtSoapSimpleType(const QtSoapQName &name, Type type, QVariant variant);

 qtsoap.cpp

QtSoapSimpleType::QtSoapSimpleType(const QtSoapQName &name, Type type, QVariant variant): QtSoapType(name, type), v(variant){
}

 just in case anybody else has this issue in the future.

----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.