Reputation: 237
I am developing a BlackBerry 10 apps with Cascades (C++ programming language) right now. Can anyone tell me how do i make a call to an ASP.NET web service in BlackBerry 10: Cascades? I'm just a beginner, so i don't really know anything. Thanks for your answer :D
Upvotes: 1
Views: 717
Reputation: 1586
Mostly HTTP communication is done using QNetworkRequest, QNetworkAccessManager, and QNetworkReply classes in Qt. To get response from a web service follow below shown snippet:
QNetworkAccessManager* netManager = new QNetworkAccessManager();
if (netManager) {
QUrl url(webServiceUrl);
QNetworkRequest req(url);
QNetworkReply* reply = netManager->get(req);
connect(reply, SIGNAL(finished()), this, SLOT(onReply()));
}
In onReply slot you can check if the reply contains any error & also parse the response. Do note that the response would be in form of QByteArray, you may need to cast into QString or in your desired form.
For more information follow this tutorial
Upvotes: 2