This blog post shows the basics of using the WSO2 Developer Studio to develop a JAX-WS. After creating the web service, you can write web services clients that use the web service on a network. Java API for XML-Based Web Services (JAX-WS) , which is also known as JSR-224, is the next generation Web services programming model that extends the foundation provided by the Java API for XML-based RPC (JAX-RPC) programming model. Using JAX-WS, developing Web services and clients is simplified with greater platform independence for Java applications by the use of dynamic proxies and Java annotations. Apache CXF is an open source web service framework that provides an easy to use, standard-based programming model for developing web services. Web services can be implemented using different application protocols like SOAP, XML, JSON, RESTful HTTP, and support various transport protocols like HTTP or JMS. WSO2 Developer Studio (formerly named WSO2 Carbon Studio) is a complete Eclipse-based ...
After a long time I got a chance to work again with QT framework, Here are some of the findings about how to invoke RESTful webservices using QT. It's pretty easy really!! requirements g++ or compatible c++ compiler QT5 or later with QtNetwork module source main.cpp #include <QCoreApplication> #include <QtCore/QUrl> #include <QtNetwork/QNetworkRequest> #include <QtNetwork/QNetworkReply> #include <QJsonDocument> #include <QJsonObject> int main(int argc, char *argv[]) { QCoreApplication app(argc, argv); QEventLoop eventLoop; QNetworkAccessManager mgr; QObject::connect(&mgr, SIGNAL(finished(QNetworkReply*)), &eventLoop, SLOT(quit())); QNetworkRequest req( QUrl( QString("http://api.openweathermap.org/data/2.5/weather?q=colombo,lk") ) ); QNetworkReply *reply = mgr.get(req); eventLoop.exec(); if (reply->error() == QNetworkReply::NoError) { QString strReply = (QString)reply->r...
If your writing an application in Linux where you dealing with low-level hardware details, using udev is a better choice rather than calling executable and reading the content in their STDOUT This is a small C code to get information about list of installed webcam programmatically using udev. This is written in C, this can be integrated with other languages such as Python, Java using a wrapper interface such as JNI(Java) or Python/C API #include <libudev.h> #include <stdio.h> #include <stdlib.h> #include <locale.h> #include <unistd.h> int main(void) { struct udev * udev; struct udev_enumerate * enumerate; struct udev_list_entry * devices, * dev_list_entry; struct udev_device * dev; /* Create the udev object */ udev = udev_new(); if (!udev) { printf("Can't create udev\n"); exit(1); } /* Create a list of the devices in the 'video4linux' subsystem. */ enumerate = udev_enumerate_new(udev); udev_enu...
Comments
Post a Comment